Files
foxhunt/services/backtesting_service
jgrusewski 6c93faa7d4 fix(services): keep cuda feature on ml dep — services were pulling
default-features which included cuda; my prior commit dropped both
default-features=false AND added only `financial`, breaking compile.

ml's source references cudarc unconditionally (cudarc::driver::CudaSlice
etc. are not behind #[cfg(feature = "cuda")]). With `cuda` feature off,
cudarc is not pulled in, leading to 722 unresolved-module errors.

Add `cuda` explicitly to the features list. The 8 leaf sub-crates
(ml-backtesting, ml-paper-trading, etc.) stay dropped — the win on
service compile time is preserved.

Real fix is to gate cudarc references in crates/ml/src/ behind
`#[cfg(feature = "cuda")]`, but that's a separate refactor.
2026-05-02 11:11:02 +02:00
..

backtesting_service

Strategy backtesting engine with historical data replay, performance reporting, and results persistence.

Key Types

  • BacktestingServiceImpl -- main gRPC service
  • DataReplayEngine -- historical market data replay
  • PerformanceReporter -- Sharpe, drawdown, win rate metrics

gRPC Endpoints

  • RunBacktest -- submit backtest configuration and strategy
  • GetBacktestResults -- retrieve results for completed backtests
  • ListAvailableStrategies -- list registered strategies
  • GetBacktestReport -- detailed performance report

Configuration

  • GRPC_PORT -- gRPC listen port
  • DATABASE_URL -- PostgreSQL connection string
  • Historical data directory with Parquet tick/OHLCV files

Testing

SQLX_OFFLINE=true cargo test -p backtesting_service --lib