## Changes ### Step 1: Agentic Debate Depth - Increase `max_debate_rounds` and `max_risk_discuss_rounds` from 1 → 2 in `default_config.py` - Fix bug in `trading_graph.py`: wire config values into `ConditionalLogic()` (was ignoring config, using hardcoded defaults) ### Step 2: 8-Quarter TTM Fundamental Analysis - New `tradingagents/dataflows/ttm_analysis.py`: parses quarterly income/balance/cashflow CSV strings, computes TTM (sum of last 4 quarters), QoQ/YoY growth rates, margin trends across 8 quarters - New `@tool get_ttm_analysis` in `fundamental_data_tools.py` - Wire into fundamentals ToolNode; register in `TOOLS_CATEGORIES` - Update fundamentals analyst prompt: "last 8 quarters (2 years)" focus ### Step 3: Sector & Peer Relative Performance - New `tradingagents/dataflows/peer_comparison.py`: sector peer lookup, 1W/1M/3M/6M/YTD return ranking, alpha vs sector ETF - New `@tool get_peer_comparison` and `@tool get_sector_relative` - Wire into fundamentals ToolNode ### Step 4: Macro Regime Flag - New `tradingagents/dataflows/macro_regime.py`: 6-signal classifier (VIX level/trend, credit spread HYG/LQD, yield curve TLT/SHY, market breadth SPX vs 200-SMA, sector rotation) → risk-on / transition / risk-off - New `@tool get_macro_regime`; add `macro_regime_report` field to AgentState - Wire into market ToolNode; feed into research_manager and risk_manager prompts ### Step 5: Tests (88 new unit tests, 0 integration) - `tests/test_debate_rounds.py` (17 tests) - `tests/test_ttm_analysis.py` (18 tests) - `tests/test_peer_comparison.py` (11 tests) - `tests/test_macro_regime.py` (16 tests) - `tests/test_config_wiring.py` (12 tests) All 88 new unit tests pass; no regressions in existing tests. https://claude.ai/code/session_01TuPpssTo83whKkNgSu57HH |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| alpha_vantage.py | ||
| alpha_vantage_common.py | ||
| alpha_vantage_fundamentals.py | ||
| alpha_vantage_indicator.py | ||
| alpha_vantage_news.py | ||
| alpha_vantage_scanner.py | ||
| alpha_vantage_stock.py | ||
| config.py | ||
| interface.py | ||
| macro_regime.py | ||
| peer_comparison.py | ||
| stockstats_utils.py | ||
| ttm_analysis.py | ||
| utils.py | ||
| y_finance.py | ||
| yfinance_news.py | ||
| yfinance_scanner.py | ||