Review fixes applied:
- format_signals_for_role accepts both list and JSON string
- Test imports aligned with actual function names
- Test assertions use actual StrategySignal keys
- Tax optimization: informative message when lot data unavailable
- Pairs trading: single batch yf.download replaces 10 sequential calls
Based on: Kakushadze & Serur, '151 Trading Strategies',
Palgrave Macmillan 2018. SSRN 3247865, DOI 10.1007/978-3-030-02792-6
Add effort parameter (high/medium/low) for Claude 4.5+ and 4.6 models,
consistent with OpenAI reasoning_effort and Google thinking_level.
Also add content normalization for Anthropic responses.
InvestDebateState was missing bull_history, bear_history, judge_decision.
RiskDebateState was missing aggressive_history, conservative_history,
neutral_history, latest_speaker, judge_decision. This caused KeyError
in _log_state() and reflection, especially with edge-case config values.
Prevents UnicodeEncodeError on Windows where the default encoding
(cp1252/gbk) cannot handle Unicode characters in LLM output.
Closes#77, closes#114, closes#126, closes#215, closes#332
- Add StatsCallbackHandler for tracking LLM calls, tool calls, and tokens
- Integrate callbacks into TradingAgentsGraph and all LLM clients
- Dynamic agent/report counts based on selected analysts
- Fix report completion counting (tied to agent completion)