import type { BacktestEngine } from '../src/backtest/BacktestEngine'; import { BacktestConfigSchema, type BacktestConfig } from '../src/types'; /** * Preserved offline prototype for older strategy algorithms; not a production research route. * Importing this example starts no services, loads no model and submits no work. * A standalone prototype engine owns this demonstration. It does not create durable research results. * Production research uses approved retained versions and the canonical runner. */ export function runMultiStrategyBacktest( runner: Pick, range: Pick ) { const request = BacktestConfigSchema.parse({ symbols: range.symbols, startDate: range.startDate, endDate: range.endDate, mode: 'backtest', name: 'SMA and mean-reversion example', strategy: 'sma-crossover', initialCapital: 100000, dataFrequency: '1d', commission: 0.001, slippage: 0.0001, strategies: [ { name: 'sma-crossover', enabled: true, config: { fastPeriod: 5, slowPeriod: 15, positionFraction: 0.1 }, }, { name: 'mean-reversion', enabled: true, config: { lookbackPeriod: 20, entryThreshold: 2, exitZScore: 0.5 }, }, ], }); return runner.runBacktest(request); }