feat(telemetry): persist total_equity for live return series#214
Conversation
Persist portfolio equity snapshots so QPK ReturnCollector can derive live daily returns for drift monitoring (task 5). Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3601b27d48
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "total_equity": (result.get("portfolio") or {}).get("total_equity") | ||
| or (result.get("portfolio") or {}).get("equity"), |
There was a problem hiding this comment.
Preserve zero-valued total_equity in telemetry
When the portfolio's total_equity is exactly 0.0 (for example the existing zero-equity strategy-cycle path), this or treats it as absent and falls back to portfolio.get("equity"), which is normally unset, so the execution telemetry records None instead of the real zero. That defeats the new live return series field for empty/small accounts and can make the collector drop or misinterpret a valid datapoint; check key presence or is not None instead of truthiness.
Useful? React with 👍 / 👎.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Summary
total_equityDepends on
Test plan
Made with Cursor