optionstratlib-backtest
Strategy backtests over simulated paths for
OptionStratLib: a strategy
is evaluated on every path of a simulator, each path ends by an exit policy,
and the run is summarised with its statistics, report types and metrics. The
crate depends on optionstratlib-core, optionstratlib-pricing,
optionstratlib-simulation, optionstratlib-analytics and
optionstratlib-strategies, and on no option-chain I/O, plotting or async
code.
| Module | Contents |
|---|---|
backtesting |
Simulate, adapters from the engine's path results, statistics, reports, metrics |
error |
BacktestError |
Place in the workspace
- Depends on
optionstratlib-core,optionstratlib-pricing,optionstratlib-simulation,optionstratlib-analyticsandoptionstratlib-strategies. - Must not depend on
optionstratlib-visualization;make check-graphenforces the layering (ADR-0001 D9). - In the facade:
optionstratlib::backtestingandBacktestErrorinoptionstratlib::error, under the facade featurebacktest. The facade paths are the same types as the paths here; the ownership map lists every one with its feature.
Moving from 0.21? The 0.22 architecture and adoption guide maps each redesign to its replacement workflow; 0.22 keeps no compatibility with 0.21.
Minimal example
use SimulationStatsResult;
Runnable example
A runnable program that depends on this crate directly, with the smallest
dependency set and no facade, is osl-example-direct-backtest; make tree-example-direct-backtest
asserts its resolved graph.
Features
| Feature | Default | Effect |
|---|---|---|
schema |
no | Derives utoipa::ToSchema on backtest types and enables schema below |
License
MIT