Repository navigation
v0.3.0 - State Statistics, simulate_weights & Single Data Path
Highlights v0.3.0
- Typed regime statistics:
LabelAssignment.to_statistics()returns oneRegimeStatisticsper regime (training-window moments). States that share a regime — the positive-drift guardrail under VOLATILITY/SHARPE — are combined with occupancy-weighted moments, mirroring howrelabel_probabilitiessums their posteriors;raw_stateslists every member state, and return/volatility/Sharpe areNonefor a regime without weight.TelemetryPayload.state_statisticscarries them,statistics_for(regime)looks one up, andWalkForwardFold.statisticsholds each fold model's statistics. describe()keeps one row per raw state (as in 0.2.0), sorted by ladder position.- Correct signing model:
latest_telemetryuses the model and statistics of the fold that producedobservation_date, instead of always the last fold. simulate_weights: backtest any hand-supplied target-weight schedule under the same signal-lag, rebalancing and cost assumptions.run_backtestis reimplemented on it with numerically identical output (golden regression test).- Breaking (type consumers):
BacktestResult.regimesandregime_metricsare optional (Nonewhen a weight path rather than a regime signal was simulated). - Fix: leading sessions whose confidence is below the floor now hold 100% CASH and earn the risk-free rate, instead of holding zero weights and earning nothing.
- Breaking — single data path: the pipeline fetches through
load_aligned_panel. The panel cache moves fromartifacts_dir/cachetodata.cache_dir, panels are reused withindata.cache_ttl_hours(the TTL is no longer forced to 0) and alignment anchors ondata.calendar_anchor;force_refresh=Truerestores always-refetch. RankingMethod.SHARPEdocstring now states it is no longer any classifier's default (hmm/hamilton→STRESS,gmm→VOLATILITY).
Full details in the CHANGELOG.