summaryrefslogtreecommitdiff
path: root/services/strategy-engine/src/strategy_engine/stock_selector.py
AgeCommit message (Collapse)Author
11 hoursfix: add session lock in StockSelector, remove unused HEALTH_PORT_OFFSET, ↵HEADmasterTheSiahxyz
lint fixes - Add asyncio.Lock to StockSelector._ensure_session() to prevent race condition - Remove unused HEALTH_PORT_OFFSET constant from news-collector - Auto-fix import sorting and formatting from ruff
11 hoursstyle: auto-fix lint violations from enhanced ruff rulesTheSiahxyz
11 hoursfix: deduplicate LLM JSON parsing and reuse aiohttp sessions in stock selectorTheSiahxyz
Extract _extract_json_array() to eliminate duplicate JSON parsing logic between _parse_llm_selections() and LLMCandidateSource._parse_candidates(). Add session reuse in StockSelector via _ensure_session()/close() methods instead of creating new aiohttp.ClientSession per HTTP call. Pass shared session to LLMCandidateSource.get_candidates().
13 hoursstyle: fix lint and formatting issues across news collector and sharedTheSiahxyz
13 hoursfeat: implement 3-stage stock selector (sentiment → technical → LLM)TheSiahxyz
Adds SentimentCandidateSource (DB scores), LLMCandidateSource (Claude news analysis), and StockSelector orchestrating candidate merge, RSI/EMA20/volume technical filter, and LLM final 2-3 pick selection with Redis publish and DB persistence.