TradingAgents/tradingagents/agents/utils
ahmet guzererler 4c14080d73
feat(scanner): Finviz smart money scanner + Golden Overlap strategy
## Summary
- Adds `smart_money_scanner` as a new Phase 1b node that runs sequentially after `sector_scanner`, surfacing institutional footprints via Finviz screeners
- Introduces the **Golden Overlap** strategy in `macro_synthesis`: stocks confirmed by both top-down macro themes and bottom-up Finviz signals are labelled high-conviction
- Fixes model-name badge overflow in AgentGraph (long model IDs like OpenRouter paths were visually spilling into adjacent nodes)
- Completes all documentation: ADR-014, dataflow, architecture, components, glossary, current-state

## Key Decisions (see ADR-014)
- 3 zero-parameter tools (`get_insider_buying_stocks`, `get_unusual_volume_stocks`, `get_breakout_accumulation_stocks`) instead of 1 parameterised tool — prevents LLM hallucinations on string args
- Sequential after `sector_scanner` (not parallel fan-out) — gives access to `sector_performance_report` context and avoids `MAX_TOOL_ROUNDS=5` truncation in market_movers_scanner
- Graceful fallback: `_run_finviz_screen()` catches all exceptions and returns an error string — pipeline never hard-fails on web-scraper failure
- `breakout_accumulation` (52-wk high + 2x vol = O'Neil CAN SLIM institutional signal) replaces `oversold_bounces` (RSI<30 = retail contrarian, not smart money)

## Test Plan
- [x] 6 new mocked tests in `tests/unit/test_scanner_mocked.py` (happy path, empty DF, exception, sort order)
- [x] Fixed `tests/unit/test_scanner_graph.py` — added `smart_money_scanner` mock to compilation test
- [x] 2 pre-existing test failures excluded (verified baseline before changes)
- [x] AgentGraph badge: visually verified truncation with long OpenRouter model identifiers

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-03-24 16:03:17 +01:00
..
agent_states.py feat: medium-term positioning upgrade (debate rounds, TTM, peer comparison, macro regime) (#14) 2026-03-17 22:27:40 +01:00
agent_utils.py Parallel pre-fetch for analyst agents to reduce LLM round-trips 2026-03-23 21:08:15 +00:00
core_stock_tools.py minor fix 2025-09-26 23:25:33 +08:00
fundamental_data_tools.py feat: medium-term positioning upgrade (debate rounds, TTM, peer comparison, macro regime) (#14) 2026-03-17 22:27:40 +01:00
json_utils.py perf: pre-compile regex patterns in extract_json util 2026-03-21 01:34:43 +00:00
memory.py feat: add multi-provider LLM support with thinking configurations 2026-02-03 22:27:20 +00:00
news_data_tools.py fix: improve data vendor implementations and tool signatures 2026-02-03 22:27:20 +00:00
portfolio_tools.py feat: add portfolio risk metrics module and LangChain agent tools 2026-03-20 14:42:43 +00:00
scanner_states.py feat(scanner): Finviz smart money scanner + Golden Overlap strategy 2026-03-24 16:03:17 +01:00
scanner_tools.py feat(scanner): Finviz smart money scanner + Golden Overlap strategy 2026-03-24 16:03:17 +01:00
technical_indicators_tools.py Sync fork with upstream TauricResearch/TradingAgents (v0.2.1) (#12) 2026-03-18 07:00:37 +01:00
tool_runner.py feat: unified report paths, structured observability logging, and memory system update (#22) 2026-03-19 09:06:40 +01:00