8-k-scanner
Scan SEC 8-K disclosures across a single ticker or a watchlist using Massive's pre-parsed disclosure taxonomy. Groups the…
Regime-conditional forecasting. Takes today's market-regime feature vector (5/20/60/120-day return, above 50/200-day SMA, RSI, realized vol, drawdown from 252-day high) and finds K historical periods with the most similar setup via z-scored Euclidean distance. Deduplicates
Claude Code
$ npx -y skills add rgourley/quant-garage --skill historical-analog-finder --agent claude-code
Codex
$ npx skills add rgourley/quant-garage --skill historical-analog-finder -a codex -y
Cursor
$ npx skills add rgourley/quant-garage --skill historical-analog-finder -a cursor -y
Gemini CLI
$ npx skills add rgourley/quant-garage --skill historical-analog-finder -a gemini-cli -y
GitHub Copilot
$ npx skills add rgourley/quant-garage --skill historical-analog-finder -a github-copilot -y
OpenCode
$ npx skills add rgourley/quant-garage --skill historical-analog-finder -a opencode -y
Windsurf
$ npx skills add rgourley/quant-garage --skill historical-analog-finder -a windsurf -y
name: historical-analog-finder description: Regime-conditional forecasting. Takes today's market-regime feature vector (5/20/60/120-day return, above 50/200-day SMA, RSI, realized vol, drawdown from 252-day high) and finds K historical periods with the most similar setup via z-scored Euclidean distance. Deduplicates overlapping matches so one crisis window doesn't dominate. Reports the forward SPY return distribution at multiple horizons across accepted analogs. Use when the operator wants "what usually happens next from setups like this," honest about the IQR rather than a point forecast.
You hand over K (default 20) and horizon_days (default [30, 60, 90, 252]) and get back the K historical periods most similar to today's market regime, plus the forward SPY return distribution across those analogs.
Regime-conditional forecasting. The mean is not a point forecast; the IQR is the honest read.
"any historical analogs to now", "regime analog"
tells you WHAT USUALLY FOLLOWS
distribution matters more than a point estimate
full history window (default 20 years).
**Layer 1 JSON** matching [`output-schema.json`](./output-schema.json). Current regime feature snapshot (raw + z-scores), the K analogs with distance + forward returns per horizon, forward return distribution stats per horizon (p10, p25, median, p75, p90, mean, hit rate > 0).
**Layer 2 rendered note**. Current-regime snapshot block, forward- distribution table across horizons, top-analog date list with per- horizon returns. See [`references/rendering.md`](./references/rendering.md).
1. **Fetch SPY** over `history_years` (default 20). 2. **Compute a daily feature panel**: for every day with enough history (>= 260 bars), build a 9-dim vector:
3. **Z-score the panel column-wise**. Today's z-score vector is the reference. 4. **Compute Euclidean distance** from today to every prior day. 5. **Rank by distance**, then dedupe: reject any candidate within `min_gap_days` (default 30) of an already-accepted analog so one historical window doesn't dominate. 6. **Look up forward SPY returns** at each requested horizon for each accepted analog. 7. **Aggregate to distribution stats** per horizon.
history)
captured. A richer analog would fold in sector-rotation-signal + fixed-income-context features. Documented as a caveat.
structurally.** Analog periods pre-2008, pre-QE, or pre-2020 sample from different macro machinery.
hit-rate-above-zero as the honest reads.
30-day dedupe, K=20 is achievable, but a caller passing K=50 will often see fewer than 50 accepted. The payload reports the actual count.
Trade like a pro. Without the terminal. View the full landing page → Quant and equity research tools that run inside Claude, or behind your own UI.
Scan SEC 8-K disclosures across a single ticker or a watchlist using Massive's pre-parsed disclosure taxonomy. Groups the…
Track sell-side analyst positioning on a name via Benzinga Analyst Ratings. Pulls every rating event over the lookback window,…
Build a clean, point-in-time, ready-to-backtest OHLCV dataset for a US equity universe across an arbitrary date window. Emits…
Bayesian Online Change-Point Detection (BOCPD) on a ticker's daily log returns. Detects points in time where the…
Single-commodity macro read. Answers "is this commodity in a winning or losing macro setup right now" and names the macro driver…
Reconcile a position file against splits, dividends, and spinoffs to catch breaks before they hit P&L or T+1 settlement. Use when…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…