Skip to content
All library documents

Configuring Parallel Grid-Trading Backtests Across Symbols

Code Stratmill research code

Summary

This Python script launches a Rust grid-trading backtest for each symbol in a ticker configuration. It assembles daily market-data and latency-file paths for a specified date range, passes instrument and strategy settings to the backtest executable, and runs the jobs through a multiprocessing pool. Per-symbol settings include tick and lot sizes, minimum quantity, spread and grid spacing, grid count, skew, order size, and a maximum position.

The example sets order size to roughly a target dollar value, rounded to the instrument’s lot size and bounded by its minimum quantity; maximum position is then tied to the grid count. It notes that suitable parameters can be found through grid search, but provides no search procedure, output analysis, or performance evidence. The script depends on correctly prepared input files and ticker metadata, and constructs a shell command from those values, so data availability and command execution are practical constraints. It is a backtest runner and configuration example, not evidence that the grid strategy is profitable.

Key ideas

  • The script parallelizes independent symbol backtests by invoking a Rust executable from Python.
  • It builds data and latency file lists for every calendar date in the requested range.
  • Grid parameters and instrument constraints are loaded per symbol from ticker metadata.
  • Order quantity is rounded to lot size around a target notional and raised to the minimum permitted quantity when needed.
  • The document mentions grid search for parameter selection but does not report its method or results.

Tags

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