Fix RF-index guard, common-end panel trim, notebook contamination fal…#4
Merged
Merged
Conversation
…se-positive, and error-swallowing in _download - metrics.annualized_sharpe now raises on a misaligned rf Series index instead of silently auto-aligning and dropping months (matches factor_regression and the paired bootstrap's existing guard). - data.build_panel now trims to a common END across tickers, not just a common start, so mixed-age caches can't produce NaN tails. - 04_results.ipynb's OOS-contamination assert matched prior confirmatory rows on end_date, which advances every time LAST_COMPLETE_MONTH_END is bumped -- false-positiving on every future rerun. Now matches on the full-history start date (fixed) plus signal config instead. - data._download no longer swallows the real exception from a failed TLS profile; the last one is chained via `raise ... from last_exc`. - Documented (not changed): the final holding period's exit is never costed, symmetric with the buy-and-hold benchmark's own uncosted final mark. - README/ROADMAP wording: "the edge survives 20 bps" corrected to describe the net Sharpe's sign, not a claim of edge (contradicted Phase 5's zero-alpha verdict); block-bootstrap length description corrected to match metrics.py's actual pre-registered-then-checked story. - Added CI (pytest + ruff) via .github/workflows/ci.yml with a README badge, made the project pip-installable (pyproject.toml build-system), and split requirements.txt into runtime vs. requirements-dev.txt tooling. - Disclosed in the README: trials_log.csv shows the same in-sample config's Sharpe drifting in the 6th digit across pulls because Yahoo restates historical adjusted prices on new dividends. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QBmZ3Uk5PETpZqh53aWJvE
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.
…se-positive, and error-swallowing in _download
raise ... from last_exc.Claude-Session: https://claude.ai/code/session_01QBmZ3Uk5PETpZqh53aWJvE