Spaces:
Sleeping
Sleeping
Commit History
-
fix: retrospective agent evaluated wrong month and crashed; persist its analysis to Reports tab
Bibhu Mishra +1: Claude Sonnet 5The retrospective always evaluated (current month - 1), so when trading went live mid-June it kept evaluating an empty May instead of June where the real trades were, silently skipping strategy tuning. Now falls back to the current in-progress month when trading started after the naive previous month. Also fixes a MultipleResultsFound crash once a month has more than one portfolio snapshot, and a "^SPY" ticker typo (the caret prefix is for indices, not the SPY ETF) that made get_spy_monthly_return always return None. Also adds a retrospective_reports table + /retrospective-reports API + a "Monthly Retrospective" tab on the Reports page, so the pattern analysis, tuning rationale, and PDF that the agent already produces are persisted and visible in the UI instead of living only inside the PDF and the raw run log. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>a381fc9