Add portfolio allocation display and P&L tracking enhancements - #7
Add portfolio allocation display and P&L tracking enhancements#7IamJasonBian wants to merge 2 commits into
Conversation
- Remove broken portfolio history API (404 error fix) - Add dollar cost average (DCA) and P/L to position details in audit - Add portfolio coverage percentage to order book display - Enhance logging for portfolio history API calls with detailed debug info - All tests passing (6/6) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review — PR #7Overall: Adds P&L tracking and proportional coverage calculations to the audit system. The proportional equity coverage fix (from binary "has coverage" to actual coverage percentage) is a meaningful accuracy improvement. Concerns
RecommendationGiven the age, consider rebasing and re-running tests. If too painful, it may be easier to cherry-pick the audit.py proportional coverage changes onto a fresh branch from current main. Generated by Claude Code |
|
Stale PR notice — This PR has been open for 63 days (~9 weeks) with no new commits since Feb 8. The prior review noted significant base SHA drift and recommended cherry-picking the proportional-coverage audit changes onto a fresh branch rather than attempting a rebase. Please either rebase+revalidate or close and open a fresh PR for the audit.py changes. Generated by Claude Code |
|
Stale — 11 weeks, no activity since Feb 8. Two prior reviews recommended cherry-picking the proportional-coverage audit changes onto a fresh branch from current Generated by Claude Code |
Code Deletion & Redundancy — PR #7This PR is now 16 weeks old with extreme base SHA drift. Here's what can be deleted to make it mergeable (or help decide to close it). 1. Delete
|
IamJasonBian
left a comment
There was a problem hiding this comment.
Stale — oldest open PR (5+ months). Consider closing.
Review notes if this is still relevant:
get_portfolio_historycreates alogging.getLogger(__name__)on every call. Move it to a module-level constant.- Proportional coverage fix in
audit.pyis a genuine improvement — the old code counted full equity for any partial coverage, now it's proportional. This logic is worth extracting into its own focused PR. - P&L fields added to
check_coverage(profit_loss,profit_loss_pct,avg_buy_price) — useful, but they expand the audit's responsibility. Consider whether P&L belongs in the coverage audit or in a separate summary method. - Order value / coverage % in
get_portfolio_summaryadds useful output but is print-only — not returned as data. If downstream consumers need this, it should be in the return value too.
Recommendation: The proportional coverage fix is the valuable core of this PR. The rest (P&L tracking, portfolio history, order value display) could be separate PRs. Given the age and likely merge conflicts with main, consider rebasing the coverage fix alone into a fresh branch and closing this.
Generated by Claude Code
PR to add P&L stuff