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

File contents

rgourley/quant-garage/tree/main/skills/historical-analog-finder commit c9b50bdc60

Frequently asked questions

npx skillmds@latest add rgourley/historical-analog-finder