TradingAgents/tradingagents/portfolio
Ahmet Guzererler 4e8e6c237e feat: introduce flow_id with timestamp-based report versioning
Replace run_id with flow_id as the primary grouping concept (one flow =
one user analysis intent spanning scan + pipeline + portfolio). Reports
are now written as {timestamp}_{name}.json so load methods always return
the latest version by lexicographic sort, eliminating the latest.json
pointer pattern for new flows.

Key changes:
- report_paths.py: add generate_flow_id(), ts_now() (ms precision),
  flow_id kwarg on all path helpers; keep run_id / pointer helpers for
  backward compatibility
- ReportStore: dual-mode save/load — flow_id uses timestamped layout,
  run_id uses legacy runs/{id}/ layout with latest.json
- MongoReportStore: add flow_id field and index; run_id stays for compat
- DualReportStore: expose flow_id property
- store_factory: accept flow_id as primary param, run_id as alias
- runs.py / langgraph_engine.py: generate and thread flow_id through all
  trigger endpoints and run methods
- Tests: add flow_id coverage for all layers; 905 tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 14:13:50 +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
dual_report_store.py feat: introduce flow_id with timestamp-based report versioning 2026-03-26 14:13:50 +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: introduce flow_id with timestamp-based report versioning 2026-03-26 14:13:50 +01:00
portfolio_states.py feat: PM brain upgrade — macro/micro agents & memory split (#123) 2026-03-26 12:55:24 +01:00
report_store.py feat: load flow_id in FE to resume runs and fix max_tickers cap (#113) 2026-03-26 07:10:42 +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 feat: load flow_id in FE to resume runs and fix max_tickers cap (#113) 2026-03-26 07:10:42 +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