Historical Analog Finder

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.

rgourley Updated 7 repo stars
og

File contents

rgourley/quant-garage commit c9b50bdc60

Frequently asked questions

npx get-skill add rgourley/historical-analog-finder