Skip to content

Complete Backtest task routes and verified book guide - #123

Merged
stefan-jansen merged 3 commits into
mainfrom
codex/documentation-quality
Sep 24, 2026
Merged

stefan-jansen merged 3 commits into
mainfrom
codex/documentation-quality

Conversation

@stefan-jansen

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

Copy link
Copy Markdown
Contributor

Summary

  • Add a task-level Zipline migration guide with a clean-wheel target-weight example and explicit differences in data input, callbacks, scheduling, orders, costs, and results.
  • Give each principal User Guide task a direct API destination and checked book notebook. The Book Guide now labels all 18 linked notebooks by how they use the library or a related research workflow.
  • Pin all 22 companion book paths to the checked public book commit 2d6e8f95eeccaee66906245606471f570b5807e5. Correct two case-study descriptions that overstated what the notebooks show.
  • Remove homepage claims that all execution details are configurable or that event-driven operation alone prevents look-ahead.

Capability inventory

Principal task Task route API reference Wheel example Book example
Prepared bars, signals, timestamps Data Feed DataFeed five asset-panel smoke examples futures feed notebook
Strategy decisions and state Strategies, Stateful Strategies Strategy.on_data quickstart, risk/state stateful strategies notebook
Orders and fill timing Orders, Execution Semantics Broker.submit_order orders/timing single-asset notebook
Multi-asset allocation Rebalancing Broker.rebalance_to_weights equity/ETF, futures, FX examples allocator comparison notebook
Cash, margin, sizing Accounts, Configuration BacktestConfig accounts/constraints conformal sizing notebook (method, not engine API)
Costs and funding Market Impact BacktestConfig equity costs, funding, flip gross/net notebook (manual analysis)
Position and portfolio risk Risk Management StopLoss risk/state and eight risk checks library risk demo
Execution profiles Profiles BacktestConfig.from_preset profile inspection and one-setting comparison engine divergence notebook
Fill, trade, equity exports Results BacktestResult result export performance reporting notebook
Zipline migration Migrate from Zipline Engine.run, Broker.order_target_percent new target-weight round trip engine divergence notebook

The book notebooks are learning material, not clean-wheel fixtures. Book-specific helpers and datasets remain in the companion repository. The migration page states that bundle ingestion, data.history, record, and scheduling have different interfaces, and that the zipline profile covers a documented comparison protocol rather than arbitrary native Zipline behavior. Same-bar timing, costs, corporate actions, and unsupported parity pairs retain their existing limits.

Verification

  • Current public book main was 2d6e8f95eeccaee66906245606471f570b5807e5; inspected the linked notebook cells and book helper where a role assertion depends on it. Generated book_link_manifest.json from a shallow Git checkout; check_book_links.py verified 22 paths and their pinned revision.
  • Built a candidate wheel, installed it into a clean Python 3.12 environment, and passed all 34 required documentation examples with recorded output. The checker bound 146 direct public API calls. Installed ml4t-diagnostic[viz]==0.1.4 into that environment and passed the optional diagnostic handoff and tearsheet examples.
  • mkdocs build --strict passed. The rendered link check passed 8,422 content links across the complete site and 33 external guide destinations, including section anchors and pinned book URLs. A new contract test covers homepage-to-guide anchors.
  • Documentation contract tests: 18 passed. Full local non-benchmark suite: 2,212 passed, 9 skipped, 5 deselected; 87.25% coverage against an 84% gate. Ruff lint/format and all repository pre-commit hooks passed; git diff --check passed.

Related to #120. Keep the issue open until this follow-up is reviewed and the deployed guide is checked. No book or other library repository was changed.

Add a checked Zipline migration example, direct API destinations, and notebook role labels. Pin companion links to the reviewed public book commit so readers can distinguish library calls from related research workflows.
Copilot AI lite review requested due to automatic review settings September 24, 2026 17:18

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 672804b into main Sep 24, 2026
43 checks passed
@stefan-jansen
stefan-jansen deleted the codex/documentation-quality branch September 24, 2026 18:26
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.

2 participants