NautilusTrader
Tutorials

Tutorials

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

Each tutorial is a Jupytext percent-format Python file in the docs tutorials directory. You can run them directly as scripts or open them as notebooks with Jupytext.

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 simulationBundled
Backtest with order book depth data (Binance)Order book imbalance strategy on depth dataUser‑provided
Backtest with order book depth data (Bybit)Order book imbalance strategy on depth dataUser‑provided

Data workflows

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

GuideDescriptionData
Loading external dataLoad external data into the ParquetDataCatalogUser‑provided
Data catalog with DatabentoSet up a catalog with Databento schemasDatabento API key

Strategy patterns

TutorialDescriptionData
Mean reversion with proxy FX data (AX Exchange)Bollinger Band mean reversion on EURUSD-PERPTrueFX proxy
Gold perpetual book imbalance (AX Exchange)Order book imbalance on XAU-PERPDatabento API key
Grid market making with a deadman's switch (BitMEX)Grid MM with server‑side safety on XBTUSDTardis.dev
On‑chain grid market making with short‑term orders (dYdX)Grid MM on dYdX v4 perpetualsUser‑provided

Rust

TutorialDescriptionData
Book imbalance backtest with Betfair dataBook imbalance actor on Betfair L2 dataUser‑provided

On this page