Skip to content

Add portfolio holdings dashboard, event study engine, and production deployment#634

Open
ceekachandra-sudo wants to merge 12 commits into
virattt:mainfrom
ceekachandra-sudo:main
Open

Add portfolio holdings dashboard, event study engine, and production deployment#634
ceekachandra-sudo wants to merge 12 commits into
virattt:mainfrom
ceekachandra-sudo:main

Conversation

@ceekachandra-sudo

Copy link
Copy Markdown

Summary

  • Holdings & Dashboard: Added a holdings feature with dashboard and portfolio views, enabling users to track their portfolio positions
  • Event Study Engine: Built an event study engine with updated earnings data models
  • Deep Dive Analysis: Added portfolio agent analysis pipeline (Phase 2A) with rate-limited Deep Dive functionality and dev workflow hardening
  • Production Deployment: Containerised the app with Dockerfile, fixed production routing issues (login hang, React frontend serving, API route centralisation), and added Railway deployment support
  • Data Improvements: Added yfinance to production dependencies for live market data (RKLB fix), cleaned up stale v2 files, and added a release script

Test Plan

  • Verify holdings dashboard loads correctly with sample data
  • Confirm Deep Dive analysis runs within rate limits
  • Test login flow works without hanging in production
  • Verify market data fetching via yfinance
  • Check Docker build and deployment on Railway

🤖 Generated with Claude Code

Ubuntu and others added 12 commits May 10, 2026 15:24
Introduces holdings backend (model, repository, service, routes, migration)
and frontend (pages, components, API service, types) with tab navigation support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dening

Integrates the existing hedge-fund agents into the holdings workflow so users
can analyze their portfolio with one click and receive educational action labels
(ADD CAUTIOUSLY / HOLD / WATCH / REDUCE / REVIEW EXIT).

Backend:
- Portfolio agent service orchestrating all 18 agents per ticker
- Async job system (background thread + polling endpoint)
- Ticker normalization (US pass-through, UK/SEDOL marked unsupported)
- Educational action rules with guardrails (never BUY/SELL NOW)
- Watchlist CRUD + analysis
- DB tables: watchlist, portfolio_analysis_results, analysis_jobs
- Alembic migrations

Frontend:
- "Analyze Portfolio" button with async job polling
- Expandable "Why?" row showing agent reasoning and factors
- Confidence column, updated action badge colors
- Watchlist view (add/remove/analyze)

Dev workflow:
- dev.bat / dev.sh — kills stale servers, inits DB, verifies routes, starts with --reload
- db_init.py — creates missing tables/columns safely (--reset for full wipe)
- verify_routes.py — checks all required endpoints and DB tables exist
- README runbook for common 404/schema issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Analysis quality: fix ISF pence scaling, rewrite consensus synthesis,
  improve confidence calibration, add price estimates, better failure messages
- Analysis tiers: quick_scan (0 tokens), standard (4 agents), deep_dive (all)
  with rate limiting and Deep Dive disabled by default
- Deployment: Dockerfile, railway.toml, Postgres support via DATABASE_URL,
  CORS env config, static SPA serving from FastAPI
- Auth: password gate with APP_PASSWORD_HASH, login screen in frontend
- Beta UI: BetaLayout hides flow builder/debug, shows disclaimer banner
- Table UX: expandable analysis rows with better discoverability and mobile support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removed EXPOSE 8000 and updated CMD syntax.
Added a comment indicating an update for Railway.
- Move health endpoint from / to /api/health
- Add explicit GET / route that serves index.html
- SPA catch-all /{path} serves static files or falls back to index.html
- Update railway.toml healthcheck to /api/health
- API routes still take priority over SPA catch-all

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Frontend was hardcoding http://localhost:8000 which doesn't resolve in
production. Replaced all instances with centralized API_ROUTES constants
that default to relative paths (same-origin). Added fetchWithTimeout to
surface errors instead of hanging indefinitely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix yfinance MultiIndex column issue that broke all single-ticker downloads
- Fallback to yfinance when primary API returns fewer than 5 prices
- Add Deep Dive rate limiting (5 runs/day, 5 tickers max per run)
- Enable Deep Dive via DEEP_DIVE_ENABLED=true env var with confirmation dialog
- Standard mode limited to 10 tickers per run
- UI: stronger table headers, improved Details button, better card styling
- UI: replace purple buttons with neutral slate, cleaner action badges

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Was only installed locally — Railway couldn't import it, causing
all market data fetches to silently fail in production.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- DEEP_DIVE_ENABLED now read dynamically per-request instead of at import
- Ignore FINANCIAL_DATASETS_API_KEY if set to placeholder "your-..." value
- This prevents failed API calls that block yfinance fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ceekachandra-sudo

Copy link
Copy Markdown
Author

Hi! I've been using this project to build a personal portfolio tracker for my family's ISA accounts. I added holdings tracking, a Deep Dive analysis feature, and production deployment support via Docker/Railway. Happy to discuss or adjust anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant