Skip to content

[autopilot] release v0.9.0 - #159

Merged
wdm0006 merged 4 commits into
masterfrom
autopilot/release-1792314794
Oct 19, 2026
Merged

wdm0006 merged 4 commits into
masterfrom
autopilot/release-1792314794

Conversation

@wdm0006

@wdm0006 wdm0006 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Release v0.9.0 batches the allocation layer, recorded-log research APIs, and correctness fixes since v0.8.0. This is due under the release policy: new public functions and simulators plus changes to sizing and profit accounting warrant a pre-1.0 minor release. Source already carried the untagged 0.9.0 version; this PR completes that release rather than skipping to 0.10.0.

Added

  • Portfolio allocation over joint-return models: moment-based, hierarchical, mean-CVaR and online allocators, covariance shrinkage and Black–Litterman estimators, simulation and plotting. Selected solvers use keeks[allocation].
  • Deterministic HistoricalBinarySimulator and HistoricalMultiOutcomeSimulator for recorded outcomes, including multi-outcome voids.
  • load_bet_log reads a recorded bet log from CSV with row-numbered errors.
  • compare_multi_outcome_strategies ranks fresh vector strategies on a recorded multi-outcome market log (decimal-odds payoffs, zero-based winning legs, None voids) via HistoricalMultiOutcomeSimulator.
  • summarize_history, calibration_report, compare_strategies and seeded bootstrap_comparison: history metrics, reliability diagnostics, fresh-policy rankings and paired uncertainty intervals. Undefined metrics remain None; rank counts resolve ties in factory order and are not strict-superiority probabilities.
  • Constructor parameter introspection, type annotations, extension contract checks, and worked allocation, strategy-lab and recorded-log reports.

Fixed and changed

  • Multi-outcome wins credit net (payoff - 1) * stake; the allocation binary-bets adapter follows the same decimal-odds accounting.
  • Portfolio RNG streams remain attached to bets across insertion, removal and reordering. Mismatched multi-outcome market vectors fail before settlement.
  • Kelly sizes positive edges by default; explicit probability gates warn when suppressing a positive bet. Bankroll removal caps are opt-in, and refused settlements warn before simulation stops.

Breaking changes and migration

  • Rename strategy transaction_cost to transaction_cost_rate; rename simulator transaction_costs to fee_per_bet. The former is proportional to stake, the latter an absolute fee.
  • Rename max_draw_down and DrawdownAdjustedKelly's max_acceptable_drawdown to max_transaction_loss; rename normalize_probabilities to validate_probabilities and plot helper drawdown to drawdown_history.
  • Replace add_funds/remove_funds with deposit/withdraw; use amount instead of amt keywords.
  • Custom settlement hooks must implement record_settlement(won, realized_returns) with per-option outcome flags and signed returns. This replaces the old binary record_result and differing simulator hook signatures. Base classes now reject invalid returned vectors directly.
  • Pass min_probability=0.5 and bankroll max_transaction_loss=0.3 explicitly to retain the old gate and removal-cap defaults. Corrected multi-outcome accounting changes replay results. Binary payoff remains net winnings; multi-outcome/allocation payoff is decimal odds.

Release preparation

  • Consolidate unreleased entries into v0.9.0 and document missing reporting APIs and correctness fixes.
  • Restore [project] version as the authoritative packaging version per policy; keep version.py at 0.9.0 as the Sphinx mirror.
  • Switch the notebook bootstrap from an interim Git commit to keeks==0.9.0 (available after publication).
  • Add load_bet_log for validated CSV bet logs #156 (load_bet_log) merged after this PR was first prepared and is now included. Multi-outcome ranking PR Add compare_multi_outcome_strategies for recorded multi-outcome markets #155 (compare_multi_outcome_strategies) landed after that and is now included too. Version stays 0.9.0 (still a minor; no breaking change added).

Validation

  • Current master 7525037: all seven Run Tests jobs passed, including Python 3.10–3.14, lint and installed-wheel packaging: https://github.com/wdm0006/keeks/actions/runs/38990851715
  • Latest refresh re-run on merged master fecf06c (CPython 3.14): lint passes, the same 94 golden-fixture failures reproduce on pristine origin/master, all else passes. Prior refresh on ca67e13 (CPython 3.12): lint passes; the same 94 macOS golden-fixture failures remain; one order-dependent test (test_two_leg_falls_back_to_binary_kelly) failed in the full run but passes in isolation. Earlier full run (before Add load_bet_log for validated CSV bet logs #156): 3,725 passed, 2 skipped, 94 binary golden-fixture failures; 99% coverage. An archived, unchanged origin/master in the same environment produced the identical 94 failing case IDs and the same pass/skip counts; these are pre-existing macOS golden-fixture differences. Fixtures are unchanged.
  • make lint, Ruff format check, 78 docstring examples, six package/version checks and Sphinx -W --keep-going -b dummy passed.
  • Wheel and sdist built successfully; both installed and imported outside the checkout in clean environments. Wheel replay settled the expected balance of 960 from 1,000 and verified pandas was absent.
  • After merging, wait for test.yml to pass on the release merge commit before tagging. The current workflow covers Python 3.10–3.14 and Ruff; the policy's older matrix description is stale.

Downstream

  • wdm0006/keeks-elote: pyproject.toml already declares keeks[allocation]>=0.9.0,<0.10, but [tool.uv.sources].keeks pins an interim Git commit. After the tag publishes, remove that override, regenerate uv.lock against PyPI, and rerun its suite, checking renamed constructor keywords and strategy semantics. No downstream PR is opened before publication.

Post-merge release steps

Wait for green test.yml on master. Pushing the tag triggers .github/workflows/publish-pypi.yml (Publish to PyPI), which builds a wheel and sdist and uploads both through PyPI trusted publishing. No manual upload is needed. Run:

git checkout master && git pull
git tag -a v0.9.0 -m "v0.9.0" && git push origin v0.9.0

@wdm0006
wdm0006 merged commit 23b017a into master Oct 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant