Skip to content

Fix Backtest correctness issues and build guided documentation - #119

Merged
stefan-jansen merged 24 commits into
mainfrom
feat/post-0-1-8-backtest-correctness-and-guided-documentation
Sep 24, 2026
Merged

stefan-jansen merged 24 commits into
mainfrom
feat/post-0-1-8-backtest-correctness-and-guided-documentation

Conversation

@stefan-jansen

@stefan-jansen stefan-jansen commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Resolve milestone 6 correctness defects and provide an executable, example-led Backtest guide. The milestone plan remains in the private development sidecar; this PR contains the public implementation and validation artifacts.

Progress

Verification

  • Local test suite: 2,209 passed, 13 skipped. Coverage suite after the funding artifact recovery test: 2,208 passed, 9 skipped, 5 deselected; global coverage 87.25%, result.py branch coverage 89.08%; the critical-module gate passes.
  • Synthetic correctness: 66 pass, 2 unsupported. Real-strategy parity: 17 of 17 required framework pairs pass. Large-scale evidence and generated parity claims validate.
  • Ruff, ty, strict MkDocs build, 22 pinned book paths, all installed-wheel core examples, and the optional diagnostic example pass.
  • Two builds of wheel 0.1.9.dev25+g8343029f6 and its source distribution have identical hashes and pass the artifact content check. Rendered docs identify commit 8343029. All 43 remote PR checks have completed successfully or with their documented skip on this commit, including package build, coverage, compatibility, qualification, and public parity.

Issue closure on merge

Closes #103
Closes #104
Closes #105
Closes #106
Closes #107
Closes #108
Closes #109
Closes #110
Closes #111
Closes #112
Closes #113
Closes #114
Closes #115
Closes #116
Closes #117

Issue #118 remains open until the release artifact and deployed documentation are verified under the separate publication approvals.

Submit risk-tagged reduction orders once per continuous drawdown breach and reject unsupported reduce settings at construction. Preserve broker state if order submission fails, and document the configured fraction.

Closes #103.
Derive timestamp dtypes from recorded events and use the equity timeline for empty exports. Keep fills joinable to the original feed across aware and naive timestamp settings.

Closes #104.
Calculate commission once for the executed quantity, then allocate it between the closing and opening portions for trade accounting. Document estimate calls and require side-effect-free commission models.

Closes #105.
Run cash and margin estimates on independent model copies, reserve one fee for flip orders, and leave rejected estimates out of a stateful model's execution count.

Refs #105.
Apply validated timestamped funding to perpetual positions before orders and strategy callbacks, and preserve the payments in results and artifacts.

Closes #106.
Group validated daily price bars by explicit session date for causal cross-sectional decisions while keeping each later fill at its real bar time.

Closes #107.
Ship synthetic price panels for equities, ETFs, futures, FX, and crypto perpetuals and check their recorded outcomes against an installed wheel.

Closes #108.
Replace the trend-only buy-and-hold output with an installed-wheel example that records two next-bar fills, one closed trade, and reconciled equity.

Closes #109.
Execute one fixed strategy under market, limit, stop, and timing settings, and correct the order reference to match observed fill sources.

Closes #110.
Show signal-to-weight decisions for equities, ETFs, futures, and USD-quoted FX, including separate futures closes and causal session fills.

Closes #111.
Refs #115; retained parity evidence needs refresh after engine changes.
Regenerated the full 66-pair passing matrix against the current engine source.
Copilot AI lite review requested due to automatic review settings September 24, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stefan-jansen
stefan-jansen merged commit ab7d106 into main Sep 24, 2026
43 checks passed
@stefan-jansen
stefan-jansen deleted the feat/post-0-1-8-backtest-correctness-and-guided-documentation branch September 24, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment