Repository navigation
Highlights
- New opt-in
simulate_next_openandNextOpenResult: an explicit position ledger with opening fills, actual unit drift, publication ordering and observation masks. - Self-financing costs on risky buys and sells, cash accounting, and a benchmark using the same ledger conventions.
- Optional initial-equity baselines for drawdown and Calmar, including inception losses in the new ledger without changing legacy metric defaults.
Fixes And Compatibility
- HMM convergence metadata now describes the selected highest-likelihood restart. Model selection and fitted parameters are unchanged.
- The legacy overlay rejects missing, nonfinite or nonpositive prices needed for an exposed return or benchmark. Valid-input golden outputs are preserved.
- Warning migration: replace
non_session_asofwithasof_not_in_panel. Absence from a supplied panel does not prove market closure;is_stale=Falsedoes not by itself establish exchange-calendar freshness. - The legacy close-only API and pipeline defaults remain unchanged. Next-open execution is opt-in and requires caller-supplied, consistently adjusted prices and an exchange schedule.
See the execution contract and changelog for assumptions and migration details.
Validation
- 184 offline tests passed against an installed package, with tests run outside the checkout.
- Final release preparation changes documentation only; no functional code changes follow that validation.
- Ruff, formatting and strict MyPy checks pass.
- Wheel and source-distribution installation, dependency checks, module imports and both CLI entry points are verified on Windows / Python 3.12.4, without the optional Textual extra.
Distribution
This release includes the wheel, source distribution and SHA256 checksums. GitHub and PyPI publication are separate; PyPI upload is handled by the maintainer.
To install a downloaded wheel:
python -m pip install ./regimelab-0.4.0-py3-none-any.whl