Files
foxhunt/crates/backtesting
jgrusewski 74a595aff8 fix(tests): update stale 51-dim feature assertions to match 42-dim extractor
ProductionFeatureExtractorAdapter was changed to produce 42 features
(40 base + 2 regime) but three test sites and the FEATURE_NAMES constant
still expected 51 (42 + 1 volatility_regime + 8 OFI placeholders).

- backtesting: strategy_runner test assertions 51→42
- trading-service: ensemble_coordinator test assertions 51→42
- trading-service: FEATURE_NAMES_51 → FEATURE_NAMES_42 (drop OFI
  placeholders and volatility_regime, matching extraction.rs v2 layout)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:06:17 +01:00
..

backtesting

Strategy backtesting engine for simulating trading strategies against historical market data.

Key Types

  • Backtester — main backtesting engine
  • BacktestConfig — simulation configuration (time range, instruments, slippage, commissions)
  • BacktestResults — performance metrics (Sharpe, max drawdown, alpha, beta, Sortino)

Features

  • Historical data replay from Parquet files (ticks, order book snapshots, candles)
  • Configurable slippage models (fixed, percentage, volume-based)
  • Commission modeling (fixed, percentage, per-contract)
  • Pluggable strategy interface

Usage

use backtesting::{Backtester, BacktestConfig};
let config = BacktestConfig { /* ... */ };
let results = backtester.run(&strategy)?;