NautilusTrader
Tutorials

Nightly docs

These docs track unreleased changes and may change without notice. Their code examples can use APIs that the latest release lacks, so run them with a development wheel or switch to the latest release docs.

Tutorials

These tutorials give step-by-step instructions for NautilusTrader features and workflows.

Most Python tutorials are Jupytext percent-format files in the docs tutorials directory. You can run these files directly as scripts or open them as notebooks with Jupytext. Rust tutorials use the commands shown on their pages.

If you are new to NautilusTrader, complete these tutorials in order:

  1. Quickstart: Run your first backtest in five minutes with synthetic data.
  2. Backtest (Low-Level API): Use BacktestEngine directly with real market data and execution algorithms.
  3. Backtest (High-Level API): Run config-driven backtests with BacktestNode and the Parquet data catalog.
  4. Loading External Data: Load CSV or other external data into the ParquetDataCatalog (how-to guide).
  5. Backtest with FX Bar Data: Backtest FX bars with rollover interest simulation.
  6. Select a topic-specific tutorial below.

Backtesting

TutorialDescriptionLanguageData requirement
Backtest with FX Bar DataEMA cross on FX bars with rollover simulation.PythonSample
Backtest with Order Book Depth Data (Binance)Order book imbalance strategy on depth data.PythonSample or user-provided
Backtest with Order Book Depth Data (Bybit)Order book imbalance strategy on depth data.PythonSample or user-provided
Backtest with Pre-IPO Order Book Data (CoinAPI)Order book imbalance on ANTHROPIC-PERP.PythonCoinAPI Flat Files key
Backtest with Polymarket Order Book Data (FinFeed)Order book imbalance on Bitcoin Yes shares.PythonFinFeed historical key
Book Imbalance Backtest (Betfair)Book imbalance strategy on Betfair L2 data.RustSample or user-provided

Data workflows

For task-oriented data recipes, see the how-to guides:

GuideDescriptionLanguageData requirement
Loading External DataLoad external data into the ParquetDataCatalog.PythonUser-provided
Data Catalog with DatabentoSet up a catalog with Databento schemas.PythonDatabento API key

Strategy patterns

TutorialDescriptionLanguageData requirement
Mean Reversion with Proxy FX Data (AX Exchange)Bollinger Band mean reversion on EURUSD-PERP.PythonTrueFX proxy
Gold Perpetual Book Imbalance with Proxy Futures Data (AX Exchange)Order book imbalance on XAU-PERP.PythonDatabento API key
On-Chain Grid Market Making with Short-Term Orders (dYdX)Grid MM on dYdX v4 perpetuals.RustLive API
Composite Market Making on Lighter RWA with Databento US Equities NVDASignal-skewed MM on NVDA-PERP.Rust, PythonDatabento + Lighter
Hurst/VPIN Directional Strategy (Kraken Futures)Regime-filtered informed-flow strategy on PF_XBTUSD.RustTardis.dev

Options

TutorialDescriptionLanguageData requirement
Options Data and Greeks (Bybit)Stream Greeks and option chain snapshots.RustLive API
Delta-Neutral Options Strategy (Bybit)Short strangle with perpetual delta hedging.RustLive API
Delta-Neutral Options Strategy (Derive)Derive ETH strangle hedger with premium entry.RustLive API

On this page