Hypothesis: filtering to high-conviction purchases (≥$100K) produces
higher-quality picks than the current $25K threshold, which admits
routine small-lot director grants.
Research: Lakonishok & Lee 2001; Cohen, Malloy, Pomorski 2012 show
large-value insider transactions predict forward returns significantly
better than small ones.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
Scanners and strategies are 1:1 in the current codebase — separate folder
was artificial. Each scanner file now captures both implementation and thesis.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds daily /iterate and weekly /research-strategy cron workflows to the
spec — full autonomous loop with PR-gated merges, no auto-merge to main.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Defines /iterate and /research-strategy skills + docs/iterations/ folder
structure for a generic learn-improve-repeat cycle, demonstrated with the
trading agent discovery pipeline.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous implementation redirected sys.stderr to /dev/null using a
context manager. This is not thread-safe: 8 concurrent scanner threads each
mutate sys.stderr, and when one thread's context manager closes the devnull
file, another thread that captured devnull as its saved stderr attempts to
write to the closed fd and raises "I/O operation on closed file".
This corrupted sys.stderr state caused _fetch_batch_prices to fail and
all per-ticker get_stock_price fallback calls to return None, resulting in
every candidate being dropped with "no data available".
Fix by suppressing at the Python logging level instead of redirecting
sys.stderr. Logger.setLevel() is protected by internal locks and is safe
to call from concurrent threads.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>