TradingAgents/tradingagents/portfolio
ahmet guzererler 97a0d0de53
feat: configurable max_auto_tickers + run persistence with phase-level node re-run (#109)
Feature 1 - Configurable max_auto_tickers:
- Add max_auto_tickers config key (default 10) with TRADINGAGENTS_MAX_AUTO_TICKERS env override
- Macro synthesis agent accepts max_scan_tickers param, injects exact count into LLM prompt
- ScannerGraph passes config value to create_macro_synthesis()
- Backend engine applies safety cap on scan candidates (portfolio holdings always included)
- Frontend adds Max Tickers number input in params panel, sends max_tickers in auto run body

Feature 2 - Run persistence + phase-level node re-run:
- 2A: ReportStore + MongoReportStore gain save/load_run_meta, save/load_run_events,
  list_run_metas methods; runs.py persists to disk in finally block; startup hydration
  restores historical runs; lazy event loading on GET /{run_id}
- 2B: Analysts + trader checkpoint save/load methods in both stores; engine saves
  checkpoints after pipeline completion alongside complete_report.json
- 2C: GraphSetup gains build_debate_subgraph() and build_risk_subgraph() for partial
  re-runs; TradingAgentsGraph exposes debate_graph/risk_graph as lazy properties;
  NODE_TO_PHASE mapping + run_pipeline_from_phase() engine method;
  POST /api/run/rerun-node endpoint with _append_and_store helper
- 2D: Frontend history popover (loads GET /api/run/, sorts by created_at, click to load);
  triggerNodeRerun() calls rerun-node endpoint; handleNodeRerun uses phase-level
  re-run when active run is loaded

All 890 existing tests pass (10 skipped).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 15:27:28 +01:00
..
migrations Add stop_loss and take_profit fields to Trade entries in database, API, and UI 2026-03-23 21:12:01 +00:00
__init__.py Merge branch 'main' into copilot/refactor-agent-workflows-and-risk-metrics 2026-03-21 02:30:18 +01:00
candidate_prioritizer.py Implement Portfolio Manager Phases 2-5: risk evaluation, candidate prioritization, holding reviewer agent, PM decision agent, trade executor, and portfolio graph orchestration 2026-03-20 14:44:22 +00:00
config.py feat: make reports root directory configurable via env var 2026-03-24 00:15:04 +01:00
exceptions.py feat: portfolio manager data foundation — docs, SQL migration, and module scaffolding 2026-03-20 10:40:48 +00:00
models.py Add stop_loss and take_profit fields to Trade entries in database, API, and UI 2026-03-23 21:12:01 +00:00
mongo_report_store.py feat: configurable max_auto_tickers + run persistence with phase-level node re-run (#109) 2026-03-25 15:27:28 +01:00
portfolio_states.py Fix: websocket emits "Run completed." on failed runs, masking errors in frontend (#102) 2026-03-24 18:06:48 +01:00
report_store.py feat: configurable max_auto_tickers + run persistence with phase-level node re-run (#109) 2026-03-25 15:27:28 +01:00
repository.py Merge branch 'main' into feature/portfolio-resumability-and-cleanup 2026-03-24 03:32:09 +01:00
risk_evaluator.py Implement Portfolio Manager Phases 2-5: risk evaluation, candidate prioritization, holding reviewer agent, PM decision agent, trade executor, and portfolio graph orchestration 2026-03-20 14:44:22 +00:00
risk_metrics.py perf(risk_metrics): optimize _percentile using heapq 2026-03-21 20:05:29 +00:00
store_factory.py fix: address all PR#106 review findings (ADR 016) (#106) 2026-03-25 11:14:23 +01:00
supabase_client.py fix(supabase_client): enhance cursor method to reconnect on dropped connection 2026-03-25 01:03:10 +01:00
trade_executor.py Add stop_loss and take_profit fields to Trade entries in database, API, and UI 2026-03-23 21:12:01 +00:00