JupyterLab#

SigTech’s data and framework is integrated with both JupyterLab and VS Code. Use whichever tool suits your needs best. JupyterLab provides useful building blocks for quick and intuitive programming, while VS Code provides more comprehensive functionality for advanced programmers.

What is JupyterLab?#

JupyterLab is a popular web-based interactive development environment (IDE) that facilitates the creation of Jupyter notebooks.

A Jupyter notebook is a document capable of containing both code and rich text elements, such as equations, figures or links. This multi-element facility makes these documents ideal for describing a quantitative strategy, displaying the code necessary to execute the backtest, and delineating your analysis and results.

File browser#

Use the file browser in the left sidebar to view and access the files in your JupyterLab instance.

JupyterLab file browser

Note: when creating a new folder, Git can automatically generate hidden files to track its contents. Subsequent efforts to delete the folder may be prevented by Git as the folder is not empty.

The following command will force a delete within the SigTech platform:

rm -r

To learn about SigTech’s Git integration, see Workspaces.

Cells#

A Jupyter notebook is divided into cells. A cell can take one of three forms:

  • Code: the cell allows you to write, edit, and execute code. It includes syntax highlighting.

  • Markdown: The cell allows users to add rich text to explain the logic of their notebook. Markdown cells are not code.

  • Raw: The cell remains unmodified when converting to other formats. You are unlikely to use raw cells.

This distinction in cell type allows you to add richly-formatted commentary to your code.

To insert a new cell, click +:

Use the ‘+’ icon to insert a new cell

To switch the cell type between “Code”, “Markdown” and “Raw”, use the dropdown menu:

The dropdown menu in your toolbar can be used to change the cell type. Here, the cell type is set to ‘code’

Code blocks#

Individual code blocks can be executed by selecting the cell, then clicking the Run menu.

The output is displayed below the code block:

A code block with its corresponding output

Tip: To run a code block using a keyboard shortcut, press shift + enter.

Saving your work#

There are two ways to save the changes you have made to a notebook file:

  • Using the File menu, located in the top left-hand corner of the screen.

  • Using the disk image within your toolbar:

Save your work

Kernels#

A kernel is a program that runs your code. Active kernels can be viewed in the TERMINAL SESSIONS and KERNEL SESSIONS browser.

To shut down a kernel, click SHUT DOWN.

Kernels can be managed via the Terminals and Kernels browser in the left sidebar

Code snippets#

Save time with our pre-written code snippets which can be dragged-and-dropped into your notebook.

Code snippets are located to the left of the file browser. Access them by selecting the </> icon.

Keyboard shortcuts#

Learn more: JupyterLab keyboard shortcuts.

Learn more#

Learn more: official JupyterLab documentation.