Skip to content

v9.1.0

Latest

Choose a tag to compare

@MDUYN MDUYN released this 28 Nov 11:18

Investing Algorithm Framework v9.1.0

A first-class, scenario-based strategy regression framework for quantitative trading, alongside targeted metric correctness fixes. This stable minor release builds on v9.0.0.

Scenario-based strategy testing

  • Public StrategyScenario imports, deterministic initial cash/time, portfolio configuration, and isolated in-memory state with reliable cleanup.
  • Production-backed long/short lot seeding, automatic order IDs, entry prices/fees, pending orders/reservations, NETTING/HEDGE positions, and attached protection.
  • Validated historical marks and cooldown history; explicit actionable errors for impossible fixtures.
  • Non-mutating sizing, order, stop-loss/take-profit, and cooldown previews, including strategy overrides and offline prices.
  • register_position returns a Position; open_trade returns a Trade. Position-scoped trade/order queries support Context-compatible filters and historical rows.
  • Datetime-driven whole-strategy or per-source OHLCV generators, scheduled step/advance_bars, optional inclusive date bounds, and detached ScenarioStepResult snapshots.
  • Production order/fill/protection evaluation before each strategy decision. Newly emitted orders do not fill retroactively on their signal candles.
  • Runnable RSI/EMA confluence examples and extreme-crash protection regression tests, compatible with unittest and pytest. (#647)

Metric correctness fixes

  • Rolling Sharpe subtracts the annual risk-free rate using the same convention as static Sharpe; zero-volatility windows remain NaN. Numerical regression assertions cover zero/nonzero rates. (#651)
  • VaR and CVaR include the first month's return by reusing the shared monthly-return calculation. (#648)
  • Multi-window winning/losing trade averages use actual positive/negative population counts, including legacy saved count/percentage pairs. Breakeven trades are not misclassified as losses. (#646)

Corrected metrics can differ from previously saved results; recompute the affected metrics when comparing old and new reports.

Documentation

Dynamic ML/code indicator integration remains separate planning work, not a feature of this release.

Installation

Once the release workflow finishes publishing to PyPI:

python -m pip install --upgrade investing-algorithm-framework==9.1.0

Python support is unchanged: Python 3.10+.

Validation

  • 916 release-focused scenario, metrics, backtesting-domain, and confluence tests passed, plus 186 subtests, on Python 3.12.
  • Poetry metadata validation and wheel/sdist builds passed; artifacts contain version 9.1.0 and the public scenario package.
  • Docusaurus production build and whitespace checks passed; existing warnings remain unrelated.
  • Publishing this release triggers the repository's Python/native CI gates before PyPI publication.

Full comparison: v9.0.0...v9.1.0