3. Metrics

July 26, 2026 · View on GitHub

Status: Draft — content TBD.

This section will catalogue the scalar and time-series fields that a producer MAY populate on:

TODO

  • Full per-run BacktestMetrics field catalog: capital / P&L, return curves, risk-adjusted (Sharpe / Sortino / Calmar / profit factor / annual volatility / VaR / CVaR), drawdowns, TWR (alpha-only) variants, trade statistics, trade durations, trade returns (averages, medians, current-only variants), frequency, exposure, best/worst, period win-rates.
  • Full pooled Summary field catalog, including cross-run consistency and in-run stability metrics.
  • MonteCarloTest structure: name, method, metric, observed_value, null_distribution, n_permutations, p_value, alternative, seed, window, universe_key.
  • Reserved MonteCarloTest.method values (shuffle_ohlcv, and reservations for future flavours).
  • Semantics for each metric (definition, units, expected sign, boundary cases such as zero-trade runs).
  • Which fields SHOULD be extracted to blobs (see 4. Blobs).
  • Handling of unpopulated / nil / NaN scalar metrics.

Until this section is filled in, refer to the reference implementation's design doc for the canonical field list:

https://github.com/coding-kitties/investing-algorithm-framework/blob/main/docs/design/backtest-bundle-format.md