Separate backtest execution settings from strategy parameters

This commit is contained in:
Boki 2026-10-22 00:19:19 -04:00
parent 420c47704e
commit e4925ecdfe
9 changed files with 283 additions and 48 deletions

View file

@ -37,6 +37,15 @@ Built-ins cannot depend on experimental implementations. Parameter schemas live
`backtest/strategy-plan.ts` gives both backends the same global-default/per-strategy-override
precedence while retaining explicit backend-specific parameters and behavior.
Run-wide fields are defined by `BacktestExecutionSettingsSchema` in the portable
`@stock-bot/stock-config/backtest` contract. The planner projects legacy mixed configs into
built-in parameters using that schema; do not add another manual execution-field exclusion
list. Per-strategy copies of execution settings never override the run. Unknown parameter
keys remain visible to strict strategy validation. Custom TypeScript factories keep their
factory-owned extension fields, and original request/result configs stay intact for replay.
The legacy `useTypeScriptImplementation` hint never changes the selected backend; `true`
is rejected by the native path.
Persisted aliases and checkpoint versions remain stable across this source relocation:
SMA still reports `sma-crossover-fixed/v2`, and mean reversion reports
`mean-reversion/v2`. The word `fixed` in the persisted version is compatibility metadata,