Commit Graph

347 Commits

Author SHA1 Message Date
Youssef Aitousarrah 59eb1eecee fix(minervini): remove undefined ticker reference in except clause
F821: _check_minervini_df no longer receives ticker as param after refactor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:41:17 -07:00
Youssef Aitousarrah 8050d6764f fix(cache): track ohlcv_cache.py and data_cache files in git
These were untracked so CI couldn't import tradingagents.dataflows.data_cache.ohlcv_cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:41:17 -07:00
Aitous 893eb05349
Merge pull request #18 from Aitous/research/current
research: new strategy findings — 2026-04-14
2026-04-14 16:39:47 -07:00
Youssef Aitousarrah 65cd0bb094 fix(universe): add missing __init__.py for data_cache; switch to Russell 1000 via iShares
- tradingagents/dataflows/data_cache/__init__.py: fixes ModuleNotFoundError in CI
- universe.py: fetches Russell 1000 from iShares IWB CSV with weekly disk cache + fallback
- default_config.py: universe_source = 'russell1000'
- data/universe_cache.json: initial cache (weekly TTL, auto-refreshed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:36:17 -07:00
Youssef Aitousarrah f87197ef41 style: apply black/ruff formatting fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:21:13 -07:00
Youssef Aitousarrah e15e2df7a5 feat(cache): unified ticker universe + nightly OHLCV prefetch
- tradingagents/dataflows/universe.py: single source of truth for ticker
  universe; all scanners now call load_universe(config) instead of
  duplicating the 3-level fallback chain with hardcoded "data/tickers.txt"

- scripts/prefetch_ohlcv.py: nightly script using existing ohlcv_cache.py
  incremental logic; first run downloads 1y history, subsequent runs append
  only new trading days

- .github/workflows/prefetch.yml: runs at 01:00 UTC daily, before all other
  workflows; commits updated parquet to repo

- Updated 6 scanners: minervini, high_52w_breakout, ml_signal, options_flow,
  sector_rotation, technical_breakout — removed duplicate DEFAULT_TICKER_FILE
  constants and _load_tickers_from_file() functions

- minervini, high_52w_breakout, technical_breakout: replace yf.download()
  with download_ohlcv_cached() — reads from prefetched cache instead of
  hitting yfinance at discovery time

- default_config.py: added discovery.ohlcv_cache_dir config key

- data/ohlcv_cache/: initial 1y backfill (588 tickers, 5.4MB parquet)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:18:52 -07:00
github-actions[bot] 1dd00e467f research(autonomous): 2026-04-14 — automated research run 2026-04-14 21:17:06 +00:00
github-actions[bot] 17e77f036f research(autonomous): 2026-04-14 — automated research run 2026-04-14 13:47:21 -07:00
Youssef Aitousarrah 37029e554e fix(config): add missing earnings_beat and high_52w_breakout scanner configs
Both scanners were implemented by research PRs but never added to default_config.
Without entries they cannot be disabled or tuned from config and are invisible
to the settings UI. Also updated /research-strategy to make config entry mandatory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:47:21 -07:00
Youssef Aitousarrah d282bd8d10 feat(research): use Jina Reader for all web fetching in research-strategy
All WebFetch calls now route through r.jina.ai for JS-rendered, clean markdown.
arXiv uses structured API endpoint for discovery. Reddit threads fetched via
Jina after URL discovery with WebSearch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:47:21 -07:00
Youssef Aitousarrah 7ffbadca09 fix(hypotheses): prune concluded entries from active.json after each run
Concluded hypotheses already live in concluded/ — keeping them in active.json
causes the registry to grow unboundedly. Runner now removes them at the end
of each cycle. Also cleaned up the existing social_dd concluded entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:47:21 -07:00
Youssef Aitousarrah 97b2755e97 chore: rename research-strategy workflow to Daily 2026-04-14 13:47:21 -07:00
Aitous 4ff1251323
Merge pull request #16 from Aitous/iterate/current
learn(iterate): automated improvements — 2026-04-14
2026-04-14 13:13:14 -07:00
Youssef Aitousarrah 07345d9c4f feat(iterate): enforce file writes + auto-register hypotheses; research daily
- iterate: CRITICAL note that all writes must use file tools, not narration
- iterate: new Step 5.5 — auto-registers one forward-test hypothesis per run
  when a code change needs live-data validation
- research-strategy: cron changed from Monday-only to daily at 07:00 UTC

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:08:52 -07:00
Youssef Aitousarrah 298db90a14 chore(hypotheses): reduce min_days thresholds for faster conclusions
insider_buying-min-txn-100k: 21 → 14 days.
Command defaults: ≥2/day → 10d, 1/day → 14d, <1/day → 21d.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 12:58:02 -07:00
github-actions[bot] 3c1d1a2f1a chore: update performance tracking 2026-04-14 2026-04-14 14:25:52 +00:00
github-actions[bot] 53e812a1c1 chore: daily discovery 2026-04-14 2026-04-14 14:25:46 +00:00
github-actions[bot] 3bfb8cc47d chore(hypotheses): update registry 2026-04-14 2026-04-14 09:22:54 +00:00
github-actions[bot] f862e91870 learn(iterate): 2026-04-14 — automated iteration run 2026-04-14 07:25:30 +00:00
Youssef Aitousarrah fa322bf784 hypothesis(social_dd): register ranker suppression statistical hypothesis
Analysis of 25 picks reveals 60% 30d win rate (+2.32%) vs 41.7% 7d (-1.92%).
Score suppression is not the primary issue (avg score 71.5, 22/25 >= 65).
Root cause is evaluation horizon mismatch — ranker calibrated on 7d outcomes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 12:40:33 -07:00
Youssef Aitousarrah 662fdb5753 feat(hypotheses): uncap statistical hypotheses from max_active limit
Statistical hypotheses now conclude immediately on the next runner cycle
without counting toward max_active. Only implementation hypotheses occupy
runner slots. Added conclude_statistical_hypothesis() for instant analysis
against existing performance data with Gemini LLM enrichment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 12:40:33 -07:00
Aitous 79a58a540c
Merge pull request #14 from Aitous/iterate/current
learn(iterate): automated improvements — 2026-04-13
2026-04-13 12:06:56 -07:00
Aitous da541f0b77
Merge pull request #15 from Aitous/research/current
research: new strategy findings — 2026-04-13
2026-04-13 12:05:01 -07:00
github-actions[bot] 70e1264af3 chore: update performance tracking 2026-04-13 2026-04-13 14:20:23 +00:00
github-actions[bot] 1fccc3a85a chore: daily discovery 2026-04-13 2026-04-13 14:20:11 +00:00
github-actions[bot] a13ddffe8f chore(hypotheses): update registry 2026-04-13 2026-04-13 10:03:03 +00:00
github-actions[bot] 48a1c1672f research(autonomous): 2026-04-13 — automated research run 2026-04-13 09:06:49 +00:00
github-actions[bot] 17e45df41a learn(iterate): 2026-04-13 — automated iteration run 2026-04-13 07:52:59 +00:00
Aitous ddb2a010e7
Merge pull request #13 from Aitous/research/current
research: short squeeze scanner — 2026-04-12
2026-04-12 19:21:25 -07:00
Youssef Aitousarrah f73681cf1c research(short-squeeze): 2026-04-12 — new short_squeeze scanner; high SI (>20%) as squeeze-risk discovery for cross-scanner confluence
Implements ShortSqueezeScanner wrapping existing get_short_interest() in finviz_scraper.py.
Research finding: raw high SI predicts negative long-term returns (academic); edge is using
SI as a squeeze-risk flag when combined with earnings_calendar or options_flow catalysts.
Directly addresses earnings_calendar pending hypothesis (APLD 30.6% SI was strongest setup).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:10:36 -07:00
Youssef Aitousarrah a51d6193f8 research(short-squeeze): 2026-04-12 — new short_squeeze scanner; high SI (>20%) as squeeze-risk discovery for cross-scanner confluence
Implements ShortSqueezeScanner wrapping existing get_short_interest() in finviz_scraper.py.
Research finding: raw high SI predicts negative long-term returns (academic); edge is using
SI as a squeeze-risk flag when combined with earnings_calendar or options_flow catalysts.
Directly addresses earnings_calendar pending hypothesis (APLD 30.6% SI was strongest setup).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:10:30 -07:00
Youssef Aitousarrah 612366fa45 learn(iterate): 2026-04-12 — document social_dd/early_accumulation; split social_dd from social_hype in ranker (55% 30d win rate vs 14.3%)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:03:03 -07:00
Aitous 50889fd667
Merge pull request #10 from Aitous/iterate/current
learn(iterate): automated improvements — 2026-04-12
2026-04-12 18:56:47 -07:00
Youssef Aitousarrah a9389043ac fix: target Aitous/TradingAgents repo for all automated PRs
gh pr create/list/edit were defaulting to TauricResearch (upstream).
Added --repo Aitous/TradingAgents to all gh calls in iterate,
research-strategy workflows and slash commands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:53:04 -07:00
Youssef Aitousarrah 2d8b91b709 learn(iterate): 2026-04-12 — surface worst-performing strategies in ranker context; LLM now sees news_catalyst (0% 7d win rate) and social_hype (14.3%) as explicit penalties
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:46 -07:00
Youssef Aitousarrah 7ec0e52b98 learn(iterate): 2026-04-12 — raise score threshold 55→65; minervini leads; insider_buying staleness pattern identified
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:46 -07:00
Youssef Aitousarrah 7585da3ac6 chore: sync local modifications
- active.json: updated days_elapsed from hypothesis runner
- hypotheses.py: black formatting applied by pre-commit hook
- .gitignore: local additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:38 -07:00
Youssef Aitousarrah 5b13e25adc feat(hypotheses): use gemini-3-flash-preview for LLM analysis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:38 -07:00
Youssef Aitousarrah bcb325c150 feat(hypotheses): switch LLM analysis from Anthropic to Gemini
Uses google-genai SDK with gemini-2.5-flash-lite — same model already
used by the discovery pipeline, so no new secret needed (GOOGLE_API_KEY).
Removed ANTHROPIC_API_KEY from hypothesis-runner.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:38 -07:00
github-actions[bot] fe0552c87d chore: update performance tracking 2026-04-12 2026-04-12 18:04:38 -07:00
github-actions[bot] 29f6e703bb chore: daily discovery 2026-04-12 2026-04-12 18:04:38 -07:00
github-actions[bot] 379dbd748c chore: update performance tracking 2026-04-11 2026-04-12 18:04:38 -07:00
github-actions[bot] 1ab95c1e02 chore: daily discovery 2026-04-11 2026-04-12 18:04:38 -07:00
Youssef Aitousarrah 94d52df8b7 learn(iterate): 2026-04-12 — surface worst-performing strategies in ranker context; LLM now sees news_catalyst (0% 7d win rate) and social_hype (14.3%) as explicit penalties
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:04 -07:00
Youssef Aitousarrah c6aa0c725d learn(iterate): 2026-04-12 — raise score threshold 55→65; minervini leads; insider_buying staleness pattern identified
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:04:00 -07:00
Youssef Aitousarrah 8fe8c0e385 chore: sync local modifications
- active.json: updated days_elapsed from hypothesis runner
- hypotheses.py: black formatting applied by pre-commit hook
- .gitignore: local additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 17:55:28 -07:00
Youssef Aitousarrah 615107cada feat(hypotheses): use gemini-3-flash-preview for LLM analysis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 17:40:01 -07:00
Youssef Aitousarrah 43fb186d0e feat(hypotheses): switch LLM analysis from Anthropic to Gemini
Uses google-genai SDK with gemini-2.5-flash-lite — same model already
used by the discovery pipeline, so no new secret needed (GOOGLE_API_KEY).
Removed ANTHROPIC_API_KEY from hypothesis-runner.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 17:37:12 -07:00
github-actions[bot] 3dbcb3fa5b chore: update performance tracking 2026-04-12 2026-04-12 13:43:48 +00:00
github-actions[bot] 3061355f9e chore: daily discovery 2026-04-12 2026-04-12 13:43:42 +00:00