Commit Graph

322 Commits

Author SHA1 Message Date
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
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
Youssef Aitousarrah 5f688671c9 docs(spec): hypothesis backtesting system design
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:01:56 -07:00
Youssef Aitousarrah 26df957e37 feat(hypotheses): add LLM analysis to hypothesis conclusion
When ANTHROPIC_API_KEY is set, conclude_hypothesis now:
- Loads the scanner domain file for context
- Calls claude-haiku-4-5-20251001 for a 3–5 sentence interpretation
- Embeds the analysis in the concluded .md doc and PR comment

The LLM enriches the conclusion with sample-size caveats, market
context, and a follow-up hypothesis suggestion — without overriding
the programmatic accept/reject decision.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:57:52 -07:00
Youssef Aitousarrah 49175e3b0a feat(hypotheses): post conclusion as PR comment instead of auto-merging 2026-04-10 10:52:00 -07:00
Youssef Aitousarrah 9562bb7cc0 fix(hypotheses): id validation, worktree prune, safe loop, 14d enrichment cutoff
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:56:22 -07:00
Youssef Aitousarrah 5b87a56f31 feat(hypotheses): add Hypotheses dashboard tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:52:58 -07:00
Youssef Aitousarrah fe5b8886c0 fix(hypotheses): only count successful discovery days in picks_log 2026-04-10 09:50:37 -07:00
Youssef Aitousarrah 1b782b1cd6 feat(hypotheses): add daily hypothesis runner workflow 2026-04-10 09:49:10 -07:00
Youssef Aitousarrah 38b9cef41c feat(hypotheses): add /backtest-hypothesis command 2026-04-10 09:46:33 -07:00
Youssef Aitousarrah f8063f3596 fix(hypotheses): use correct 7-trading-day exit index in comparison 2026-04-10 09:31:07 -07:00
Youssef Aitousarrah 2747ccddcd feat(hypotheses): add comparison + conclusion script
Implements compute_7d_return, compute_metrics, load_baseline_metrics,
and make_decision functions with full TDD coverage (11 tests passing).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:29:22 -07:00
Youssef Aitousarrah 6c438f87e6 feat(hypotheses): add comparison + conclusion script
Implements compute_7d_return, compute_metrics, load_baseline_metrics,
and make_decision functions with full TDD coverage (11 tests passing).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:29:08 -07:00
Youssef Aitousarrah d3065f59f1 feat(hypotheses): initialize hypothesis registry 2026-04-10 09:26:17 -07:00
Youssef Aitousarrah e0b6e28a3b docs(plan): hypothesis backtesting implementation plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:04:58 -07:00
github-actions[bot] 8c5029f94a chore: update performance tracking 2026-04-10 2026-04-10 13:59:39 +00:00
github-actions[bot] 3c71342e53 chore: daily discovery 2026-04-10 2026-04-10 13:59:23 +00:00