TradingAgents/tests/portfolio
copilot-swe-agent[bot] 066460a501 feat: add portfolio risk metrics module and LangChain agent tools
- tradingagents/portfolio/risk_metrics.py: pure-Python computation of
  Sharpe, Sortino, VaR, max drawdown, beta, sector concentration from
  PortfolioSnapshot NAV history — no LLM, no external dependencies
- tradingagents/portfolio/__init__.py: export compute_risk_metrics
- tradingagents/agents/utils/portfolio_tools.py: 4 LangChain tools
  wrapping Holding.enrich, Portfolio.enrich, ReportStore APIs, and
  compute_risk_metrics so agents can access portfolio data without
  reimplementing computations
- tests/portfolio/test_risk_metrics.py: 48 tests for risk metrics
- tests/unit/test_portfolio_tools.py: 19 tests for portfolio tools
- tests/portfolio/test_repository.py: fix pre-existing import error

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
2026-03-20 14:42:43 +00:00
..
__init__.py feat: portfolio manager data foundation — docs, SQL migration, and module scaffolding 2026-03-20 10:40:48 +00:00
conftest.py feat: complete portfolio data foundation — psycopg2 client, repository, tests 2026-03-20 14:06:50 +01:00
test_models.py feat: implement Portfolio models, ReportStore, and tests; fix SQL constraint 2026-03-20 11:16:39 +00:00
test_report_store.py feat: implement Portfolio models, ReportStore, and tests; fix SQL constraint 2026-03-20 11:16:39 +00:00
test_repository.py feat: add portfolio risk metrics module and LangChain agent tools 2026-03-20 14:42:43 +00:00
test_risk_metrics.py feat: add portfolio risk metrics module and LangChain agent tools 2026-03-20 14:42:43 +00:00