feat: settle net roll-aware return - #29
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new settle-net summary metrics are not validated by tests beyond non-null checks, leaving key behavior insufficiently protected against regressions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the episode return summary produced by contract_episode_return_summary() to include a “settle” (T+1 settle gap adjusted) net roll-aware return, aligning the episode摘要 with the requested “扣减 T+1 settle gap 后的真实换月净收益” reporting.
Changes:
- Add per-episode
settle_net_roll_aware_returncomputed asroll_aware_return - t1_settle_gap. - Add aggregate summary metrics for the new settle-net series (valid count + mean).
- Document the new output in
CHANGELOG.mdand mark it completed in.planning/ROADMAP.md.
File summaries
| File | Description |
|---|---|
tests/test_contracts.py |
Adds a presence check for the new per-row settle_net_roll_aware_return field. |
src/goratio/contracts.py |
Computes settle-net roll-aware return per row and adds aggregate count/mean fields. |
CHANGELOG.md |
Notes the new settle-net episode summary output. |
.planning/ROADMAP.md |
Marks open/settle dual net-return output as completed. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+278
to
+280
| self.assertIsNotNone( | ||
| summary["rows"][0]["settle_net_roll_aware_return"] | ||
| ) |
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.
episode 摘要增加扣减 T+1 settle gap 后的真实换月净收益。