Repository navigation
fix: include newest returns in rolling risk attribution - #10
Merged
chris-cpz merged 1 commit intoNov 29, 2026
Merged
Conversation
chris-cpz
marked this pull request as ready for review
November 29, 2026 11:34
chris-cpz
merged commit Nov 29, 2026
83c0bda
into
fix/sweep1125-quant-analytics
0 of 5 checks passed
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 existing SDK risk fix addressed its own rolling windows, but the quant library's rolling attribution and factor exposures still omitted the newest observation. A 20-day series produced no 20-day result; a longer series ended its last result yesterday.
Include the final complete window in both helpers. Regression tests compare the last alpha, beta, information ratio and factor coefficients with independent NumPy calculations, including a large loss on the final day and an exactly-one-window history. Update the older IR test that accidentally asserted yesterday's window.
Validation: four new cases fail before the fix. Full suite: 1,697 passed, 7 optional skips; 83.64% coverage exceeds the 55% floor.
mypy cpz_quantandruff check cpz_quant testspass.Stacked on #8. The SDK side of the same report is covered by CPZ-Lab/cpz-py#81. Both changes are needed. No package release has occurred.
Fixes CPZ-Lab/cpzai#3128