Skip to main content

Module runner

Module runner 

Source
Expand description

Backtest runner — orchestrates the backtest loop.

BacktestRunner combines a TradeEngine, a BacktestExecutor, and either a Strategy or a set of predefined RawSignals to produce a BacktestResult.

§Two modes of operation

  1. Strategy-driven (run_strategy): The runner feeds market events to a Strategy implementation. The strategy returns Actions which are forwarded to the engine.

  2. Raw-signal replay (run_raw_signals): A pre-sorted Vec<RawSignal> is merged with the market data timeline. Signals are injected at the correct timestamps.

Structs§

BacktestConfig
Configuration for a backtest run.
BacktestRunner
Orchestrates a backtest by driving the engine with data and actions.
FutureQuoteConfig
Future-quote execution settings. Existing runners remain on legacy semantics unless BacktestRunner::run_raw_signals_future is used.
ReplayCancelled
Cooperative cancellation marker for a controlled replay.
ReplayProgress
Monotonic replay counters emitted by cancellable signal replays.

Enums§

EquityObservationKind
Stage at which an exact FutureQuote equity observation was made.
StreamingReplayError
Error returned by a controlled FutureQuote streaming replay.