Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions application/rebalance_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,8 @@ def log_message(message: str) -> None:
"submitted_orders": result.get("submitted_orders"),
"skipped_orders": result.get("skipped_orders"),
"error": result.get("error"),
"total_equity": (result.get("portfolio") or {}).get("total_equity")
or (result.get("portfolio") or {}).get("equity"),
Comment on lines +744 to +745

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

},
)
return result
Loading