Repository navigation
Add an inspectable walk-forward risk-parity example - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The portfolio and backtest examples currently demonstrate separate workflows. Add a runnable walk-forward composition that estimates monthly risk-parity allocations from exactly the prior return window, excluding the rebalance close, then evaluates them with the existing engine.
A monthly equal-weight benchmark shares the cash warmup, trade dates, initial wealth and proportional-cost conventions. Six CSV exports expose fictional prices, both target tables, estimation windows, net wealth and a shared-period summary. The README walkthrough documents the timing boundary, blank-target semantics and synthetic-model limitations. No optimization, library API or market-data integration changes.
Validation: all 345 tests passed (333 existing + 12 new), with 99.50% library coverage, plus existing lint/format and strict mypy checks. New tests cover current/future-close perturbations, exact prior windows, feasible equal-risk allocations, shared cash warmup/entry costs, fixed-target cost monotonicity and actual deterministic CLI exports. Ran the default and shorter documented commands; independently generated default CSV directories match byte for byte.