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.
- Latest: docs built from the
masterbranch for stable releases. See https://nautilustrader.io/docs/latest/tutorials/. - Nightly: docs built from the
nightlybranch for experimental features. See https://nautilustrader.io/docs/nightly/tutorials/.
Recommended order
New to NautilusTrader? Work through these in sequence:
- Quickstart - run your first backtest in five minutes with synthetic data
- Backtest (low-level API) - direct
BacktestEngineusage with real market data and execution algorithms - Backtest (high-level API) - config-driven
backtesting with
BacktestNodeand the Parquet data catalog - Loading external data - load CSV or other external data
into the
ParquetDataCatalog(how-to guide) - Backtest with FX bar data - FX bar backtesting with rollover interest simulation
- Pick a topic-specific tutorial below
Backtesting
| Tutorial | Description | Data |
|---|---|---|
| Backtest with FX bar data | EMA 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:
| Guide | Description | Data |
|---|---|---|
| Loading external data | Load external data into the ParquetDataCatalog | User‑provided |
| Data catalog with Databento | Set up a catalog with Databento schemas | Databento API key |
Strategy patterns
| Tutorial | Description | Data |
|---|---|---|
| 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 |
Rust
| Tutorial | Description | Data |
|---|---|---|
| Book imbalance backtest with Betfair data | Book imbalance actor on Betfair L2 data | User‑provided |