NautilusTrader
Tutorials
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable docs.

Tutorials

Step-by-step walkthroughs demonstrating specific features and workflows.

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

New to NautilusTrader? Work through these in sequence:

  1. Quickstart - run your first backtest in five minutes with synthetic data
  2. Backtest (low-level API) - direct BacktestEngine usage with real market data and execution algorithms
  3. Backtest (high-level API) - config-driven backtesting 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 - FX bar backtesting with rollover interest simulation
  6. Pick a topic-specific tutorial below

Backtesting

TutorialDescriptionData
Backtest with FX Bar DataEMA cross on FX bars with rollover simulation.Bundled
Backtest with Order Book Depth Data (Binance)Order book imbalance strategy on depth data.User‑provided
Backtest with Order Book Depth Data (Bybit)Order book imbalance strategy on depth data.User‑provided

Data workflows

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

GuideDescriptionData
Loading external dataLoad external data into the ParquetDataCatalog.User‑provided
Data catalog with DatabentoSet up a catalog with Databento schemas.Databento API key

Strategy patterns

TutorialDescriptionData
Mean Reversion with Proxy FX Data (AX Exchange)Bollinger Band mean reversion on EURUSD‑PERP.TrueFX proxy
Gold Perpetual Book Imbalance (AX Exchange)Order book imbalance on XAU‑PERP.Databento API key
Grid Market Making with a Deadman's Switch (BitMEX)Grid MM with server‑side safety on XBTUSD.Tardis.dev
On‑Chain Grid Market Making with Short‑Term Orders (dYdX)Grid MM on dYdX v4 perpetuals.User‑provided

Options

TutorialDescriptionData
Options Data and Greeks (Bybit)Stream Greeks and option chain snapshots.Live API
Delta‑Neutral Options Strategy (Bybit)Short strangle with perpetual delta hedging.Live API
Delta‑Neutral Options Strategy (Derive)Derive ETH strangle hedger with premium entry.Live API

Rust

TutorialDescriptionData
Book Imbalance Backtest (Betfair)Book imbalance actor on Betfair L2 data.User‑provided
Composite Market Making on Lighter RWA with Databento DBEQ NVDASignal‑skewed MM on NVDA‑PERP.Databento + Lighter
Hurst/VPIN Directional Strategy (Kraken Futures)Regime‑filtered informed‑flow strategy on PF_XBTUSD.Tardis.dev

On this page