Examples / Advanced
52-week breakouts across the megacaps
Level 4 · AdvancedPOST/v1/event-study
What it answers
Pools eight megacaps and studies every close above the prior 52-week high (with a 20-bar cooldown so a run of new highs counts once): do breakouts keep going?
Request
Input
POST /v1/event-study{ "symbols": [ "AAPL", "MSFT", "NVDA", "AMZN", "GOOGL", "META", "AVGO", "TSLA" ], "condition": "close > prev(highest(high, 252), 1)", "horizons": [ 5, 20, 60 ], "cooldown_bars": 20, "start_date": "2012-01-01" }
Live output billed to your account
Response
Output 200 OK
{ "ok": true, "data": { "condition": "close > prev(highest(high, 252), 1)", "cooldown_bars": 20, "symbols": 8, "occurrences": 400, "horizon_unit": "trading days", "results": [ { "count": 400, "mean": 0.005745, "median": 0.003584, "win_rate": 0.565, "stdev": 0.046023, "t_stat": 2.496686, "p25": -0.018704, "p75": 0.026158, "best": 0.247088, "worst": -0.141304, "horizon": 5, "baseline_mean": 0.006827, "baseline_win_rate": 0.564312, "edge": -0.001082, "edge_t_stat": -0.466078 }, { "count": 398, "mean": 0.030413, "median": 0.024754, "win_rate": 0.640704, "stdev": 0.108358, "t_stat": 5.599489, "p25": -0.025904, "p75": 0.070443, "best": 1.010929, "worst": -0.358543, "horizon": 20, "baseline_mean": 0.027631, "baseline_win_rate": 0.6182, "edge": 0.002782, "edge_t_stat": 0.508982 }, { "count": 396, "mean": 0.074123, "median": 0.056744, "win_rate": 0.659091, "stdev": 0.188809, "t_stat": 7.812324, "p25": -0.035717, "p75": 0.143891, "best": 1.331058, "worst": -0.544818, "horizon": 60, "baseline_mean": 0.085212, "baseline_win_rate": 0.679294, "edge": -0.011089, "edge_t_stat": -1.159702 } ], "per_symbol": [ { "symbol": "AAPL", "occurrences": 50, "5d": { "mean": 0.005887, "win_rate": 0.66, "count": 50 }, "20d": { "mean": 0.025774, "win_rate": 0.673469, "count": 49 }, "60d": { "mean": 0.043292, "win_rate": 0.653061, "count": 49 } }, { "symbol": "MSFT", "occurrences": 61, "5d": { "mean": -0.001219, "win_rate": 0.606557, "count": 61 }, "20d": { "mean": 0.015783, "win_rate": 0.766667, "count": 60 }, "60d": { "mean": 0.038756, "win_rate": 0.683333, "count": 60 } }, { "symbol": "NVDA", "occurrences": 60, "5d": { "mean": 0.007026, "win_rate": 0.516667, "count": 60 }, "20d": { "mean": 0.037379, "win_rate": 0.566667, "count": 60 }, "60d": { "mean": 0.147205, "win_rate": 0.779661, "count": 59 } }, { "symbol": "AMZN", "occurrences": 47, "5d": { "mean": 0.009569, "win_rate": 0.617021, "count": 47 }, "20d": { "mean": 0.014423, "win_rate": 0.617021, "count": 47 }, "60d": { "mean": 0.046922, "win_rate": 0.595745, "count": 47 } }, { "symbol": "GOOGL", "occurrences": 53, "5d": { "mean": -0.000472, "win_rate": 0.471698, "count": 53 }, "20d": { "mean": 0.006916, "win_rate": 0.584906, "count": 53 }, "60d": { "mean": 0.022121, "win_rate": 0.509434, "count": 53 } }, { "symbol": "META", "occurrences": 49, "5d": { "mean": -0.000423, "win_rate": 0.55102, "count": 49 }, "20d": { "mean": 0.014236, "win_rate": 0.55102, "count": 49 }, "60d": { "mean": 0.046238, "win_rate": 0.604167, "count": 48 } }, { "symbol": "AVGO", "occurrences": 57, "5d": { "mean": -0.000399, "win_rate": 0.491228, "count": 57 }, "20d": { "mean": 0.032519, "win_rate": 0.666667, "count": 57 }, "60d": { "mean": 0.079047, "win_rate": 0.719298, "count": 57 } }, { "symbol": "TSLA", "occurrences": 23, "5d": { "mean": 0.055446, "win_rate": 0.695652, "count": 23 }, "20d": { "mean": 0.176362, "win_rate": 0.73913, "count": 23 }, "60d": { "mean": 0.266004, "win_rate": 0.73913, "count": 23 } } ], "recent": [ { "symbol": "MSFT", "date": "2026-11-04", "close": 555.8, "ret_5d": -0.062388, "ret_20d": null, "ret_60d": null }, { "symbol": "AAPL", "date": "2026-10-22", "close": 348.22, "ret_5d": 0.001982, "ret_20d": null, "ret_60d": null }, { "symbol": "NVDA", "date": "2026-10-05", "close": 238.9, "ret_5d": -0.052658, "ret_20d": -0.154207, "ret_60d": null }, { "symbol": "META", "date": "2026-09-24", "close": 777.59, "ret_5d": -0.066436, "ret_20d": -0.165563, "ret_60d": null }, { "symbol": "AMZN", "date": "2026-08-03", "close": 284.02, "ret_5d": -0.020879, "ret_20d": -0.085381, "ret_60d": -0.108866 }, "… 12 more items …", { "symbol": "AMZN", "date": "2025-10-31", "close": 244.22, "ret_5d": 0.000778, "ret_20d": -0.042339, "ret_60d": -0.010196 }, { "symbol": "AVGO", "date": "2025-10-29", "close": 383.14, "ret_5d": -0.069974, "ret_20d": 0.030015, "ret_60d": -0.136164 }, { "symbol": "NVDA", "date": "2025-10-28", "close": 200.55, "ret_5d": -0.011618, "ret_20d": -0.115433, "ret_60d": -0.072351 } ], "notes": [ "Forward returns are close-to-close from the signal bar and overlap when occurrences are closer together than the horizon; t-stats are therefore optimistic." ], "interval": "1day" }, "meta": { "op": "event-study", "units": 24, "cost_usd": 0.0, "billing": "internal", "free_call": false, "free_calls_left": 0, "balance_usd": 5.0, "ms": 524, "interval": "1day", "data_as_of": "2026-11-12", "partial_last_bar": false } }
How to read it
prev(…, 1) compares with yesterday's 52-week high so today's bar cannot confirm itself. A positive edge at 20 and 60 days with a modest win rate is the typical momentum signature. per_symbol shows which names drive the result.
Parameters and limits: Event study reference. Analytics, not advice.