Commit Graph

304 Commits

Author SHA1 Message Date
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
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
Youssef Aitousarrah 36884966f1 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-09 23:50:55 -07:00
Youssef Aitousarrah de4ef56c91 docs(spec): hypothesis backtesting system design
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 23:34:39 -07:00
github-actions[bot] e749205886 chore: update performance tracking 2026-04-09 2026-04-09 14:27:18 +00:00
github-actions[bot] 86c23ced46 chore: daily discovery 2026-04-09 2026-04-09 14:26:53 +00:00
Youssef Aitousarrah e7e3b365d8 fix(workflows): create labels before applying them to PRs 2026-04-08 11:42:24 -07:00
Aitous 8c4ce43b2a
Merge pull request #9 from Aitous/feature/iteration-system
feat(iteration-system): self-improving iteration system
2026-04-08 11:29:39 -07:00
Youssef Aitousarrah aaff21a770 fix(research-workflow): simplify existing-PR push path, remove no-op rebase 2026-04-08 11:20:14 -07:00
Youssef Aitousarrah fa3df1a4eb feat(iteration-system): add weekly research-strategy GitHub Actions workflow 2026-04-08 11:14:03 -07:00
Youssef Aitousarrah c79e4c2bcb fix(iterate-workflow): safer push logic with force-with-lease and rebase 2026-04-08 10:49:45 -07:00
Youssef Aitousarrah 527a56d922 feat(iteration-system): add daily iterate GitHub Actions workflow 2026-04-08 10:47:17 -07:00
Youssef Aitousarrah b554108eb7 fix(research-command): add bash commands for existing PR update path 2026-04-08 10:11:16 -07:00
Youssef Aitousarrah ae46bd4c89 feat(iteration-system): add /research-strategy Claude Code command 2026-04-08 10:08:53 -07:00
Youssef Aitousarrah 7398da4fc5 fix(iterate-command): cold-start fallback, cleaner commit message, complete PR branch creation 2026-04-08 09:28:18 -07:00
Youssef Aitousarrah ca24d78cf1 feat(iteration-system): add /iterate Claude Code command 2026-04-08 08:23:50 -07:00
Youssef Aitousarrah 47bcbdc70b fix(iteration-system): add .gitkeep to track empty research/ directory 2026-04-08 08:10:26 -07:00
Youssef Aitousarrah 3fb82e8180 feat(iteration-system): add knowledge base folder structure with seeded scanner files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 08:09:07 -07:00
Youssef Aitousarrah ec2b3c2a45 docs(iteration-system): add implementation plan
Covers 5 tasks: knowledge base structure, /iterate command,
/research-strategy command, and two GitHub Actions workflows with
rolling PR logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 07:54:18 -07:00
Youssef Aitousarrah fa3166c494 docs(iteration-system): switch to rolling PR strategy
At most one open PR per skill at any time. Daily runs push onto the
existing branch and update the PR description. Merging resets the cycle.
Prevents PR accumulation from unreviewed automated runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 07:45:03 -07:00