MCPcopy Create free account
hub / github.com/Open-Quant/openquant / default

Method default

crates/openquant/src/pipeline.rs:20–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18//! 5. **Backtest** — the equity curve, drawdowns and time under water (AFML Snippet 14.4;
19//! [`crate::backtest_statistics::drawdown_and_time_under_water`]).
20//!
21//! No triple-barrier labelling, meta-labelling or model fitting happens here: the model's
22//! probabilities and sides are inputs, one per bar.
23//!
24//! # Conventions
25//!
26//! - `timestamps`, `close`, `model_probabilities` and `model_sides` are aligned, one entry per
27//! bar, oldest first. `close` must be positive prices. `model_probabilities[i]` is the
28//! probability of the predicted class and `model_sides[i]` its side (`+1`/`-1`), both known
29//! at the close of bar `i`; without sides every bet is long.
30//! - The signal is applied with a one-bar lag: the strategy's simple return over bar `i` is
31//! `timeline_signal[i - 1] * (close[i] / close[i - 1] - 1)`, so an event at bar `i` trades

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected