Skip to main content

Notebooks

The notebooks on this page provide examples of using MesoSim, Q-API and Merlin.

They are also starting points for developing your own strategies and analytics. Just make a copy and start coding in Colab!

Installation

Installation Steps

The notebooks rely on Merlin while accessing MesoSim and Q-API, therefore, Merlin must be installed in each notebook session. Installation of Merlin can be done using Google Drive or GitHub.

For convenience and ease of access, we recommend using Google Drive using this shared folder.

note

During your on-boarding process, you will be provided with the necessary access to the shared folder. If you do not have access, please contact us via the Support page.

During the installation process, you will:

  • Create a shortcut to the deltaray-software-releases under your Google Drive
  • Mount the Google Drive to the Colab environment
  • Install Merlin using the provided package (wheel) file

Create Shortcut

Open Google Drive and navigate to "Shared with me".

  1. Right-click on the "deltaray-software-releases" folder and select Organize / Add Shortcut.

    Add Shortcut - Step 1
  2. Select 'My Drive' and click 'Add'.

    Add Shortcut - Step 2
  3. Validate that "deltaray-software-releases" is now available in "My Drive".

    Add Shortcut - Result

Use it from Colab

During the first use in Colab, Google will ask for permission to access your Google Drive.

Access Drive - Step 1

You need to accept all permissions to proceed:

Access Drive - Step 2
Access Drive - Step 3

Once done, you will be able to attach your drive to the Colab environment and install Merlin.

Notebook list

The always up-to-date set of notebooks available via the "Software Releases" link in the top navigation bar.

NameDescriptionColab Link
MesoSim API Samples: Basic OperationsLearn how to create and manage backtests, retrieve events, and analyze results with MesoSim APILink
MesoSim API Samples: Options AnalyticsSet up a backtest, load event data into a DataFrame, and analyze results with scatter and quantile plots.Link
MesoSim API Samples: Space ManagementFree up space on the cluster by deleting backtests using the API.Link
Sensitivity Analysis: MonteCarlo-like analysis with randomized EntriesRun a Monte Carlo analysis on NetZero trades with random entries. Compare NAV/Equity curves.Link
Sensitivity Analysis: Using Grid Search to identify stable rangesAnalyze trade sensitivity using grid search over Delta and Expiration ranges.Link
Trade Exploration using Genetic OptimizationFind high-performing trades in a large search-space using Genetic Algorithms.Link
MesoSim and Q-API: Continuous backtest of PortfolioBuild a portfolio using three strategies with Mean Variance Optimization.Link
Merlin: Strategy OptimizationShowcasing Merlin's Predictor Discover and Strategy Optimization features.Link
Merlin: Portfolio OptimizationPortfolio Build using Optimized Strategies with MerlinLink