Commit Graph

337 Commits

Author SHA1 Message Date
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
github-actions[bot] 1357235ee5 chore: update performance tracking 2026-04-11 2026-04-11 13:42:09 +00:00
github-actions[bot] 267c69286b chore: daily discovery 2026-04-11 2026-04-11 13:41:49 +00:00
github-actions[bot] f17b2e4e02 learn(iterate): 2026-04-11 — automated iteration run 2026-04-11 06:55:28 +00:00
Youssef Aitousarrah e2c3ae14c1 fix(hypotheses): skip weekends to avoid counting non-trading days
days_elapsed counts entries in picks_log, so running on weekends would
inflate the counter with noise picks. Exit early on Saturday/Sunday.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:48:17 -07:00
Youssef Aitousarrah 91311ad69d feat(hypotheses): detect baseline drift when scanner changes on main mid-experiment
Before concluding a hypothesis, check if the scanner's source file
changed on main since created_at. If it did, the baseline picks in
performance_database.json reflect the updated code for the later part
of the experiment, which can confound the comparison.

When drift is detected, a warning is embedded in:
- the concluded .md doc (blockquote below Decision)
- the PR comment (blockquote in the conclusion body)

The programmatic decision is not overridden — the warning is purely
informational, allowing the reviewer to judge whether the result is
trustworthy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:42:21 -07:00
Youssef Aitousarrah 9e1c800f01 fix(hypotheses): symlink .env into worktree for local dev
load_dotenv() in tradingagents/config.py searches the cwd for .env.
Worktrees in /tmp/ don't have one, so symlink the main repo's .env
into the worktree root before running discovery.

In CI, secrets are passed as env vars directly — symlink is a no-op.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:12:36 -07:00
Youssef Aitousarrah a956863c48 feat(hypotheses): register insider_buying-min-txn-100k hypothesis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:05:46 -07:00
Youssef Aitousarrah 704e257dd9 Merge branch 'feature/hypothesis-backtesting' 2026-04-10 11:01:57 -07:00
Youssef Aitousarrah 2f6cb3b8fe docs(plan): hypothesis backtesting implementation plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:01:56 -07:00
Youssef Aitousarrah 52330d4c76 docs(spec): fix hypothesis capacity — running experiments never paused
Pending hypotheses queue by priority and promote when a slot opens,
rather than pausing a running experiment mid-streak.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:01:56 -07:00