Skip to content
All library documents

Building Rust Backtests with an Engine or Streaming Node

Article SuperMind

Summary

This guide explains two Rust workflows for running Nautilus Trader backtests. The lower-level BacktestEngine approach assembles a simulated venue, instruments, in-memory market data, and a strategy before running the engine. It allows direct configuration of account and order-management settings, book type, balances, and fees. An EMA crossover strategy illustrates registration and execution.

The higher-level BacktestNode workflow reads data from a Parquet catalog and streams it in configured chunks. The guide walks through writing instrument and quote data, defining venue and data settings, building the node, adding a strategy to its engine, and running it. These examples teach setup and API structure rather than trading performance: they report no results or validation evidence. Users must supply data-loading logic and choose appropriate simulation assumptions, and the guide refers elsewhere for details on fill models and matching behavior.

Key ideas

  • BacktestEngine provides direct control over simulated venues, instruments, data, strategies, and execution.
  • BacktestNode loads catalog data and streams it in configurable chunks.
  • Both examples configure a simulated venue and run an EMA crossover strategy.
  • The high-level workflow requires catalog persistence and streaming support.
  • The guide covers software setup, not strategy performance or the validity of simulation assumptions.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.