Event Study
workflow.run_event_studyEvent study with a placebo: is the average return after your events (a listing, an unlock, a signal firing) different from the average return of the same window started on random non-event dates? Give event_returns and placebo_returns in the same units; optional event_tickers and placebo_tickers (one per return) cluster the standard error by ticker, because events on one coin are not independent draws. Returns the effect (event mean minus placebo mean), Welch t-test, permutation p-value (exact when the number of splits is small, otherwise seeded random shuffles; two-sided as scipy.stats.permutation_test defines it), the cluster-robust t and p (statsmodels cluster covariance, t with clusters-1 degrees of freedom), the single event carrying most of the effect with the effect once it is dropped, honesty flags (few events, few clusters, one event dominates, sign flips without it, clustering changes the verdict) and a verdict that is distinguishable_from_placebo, not_distinguishable or fragile. It tests a difference you hand it; it does not pick dates, fetch prices or correct for look-ahead. Edge cases: event_returns and placebo_returns each 2 to 5000 finite values; event_tickers and placebo_tickers, if given, one per return, 1 to 32 characters; n_permutations a whole number 1000 to 100,000 (default 10,000) and permutations times events at most 50,000,000; alpha strictly between 0 and 0.5 (default 0.05); seed a whole number (same seed, same result); two constant samples are an error. Not covered: choosing the event window or the placebo set (the result is only as good as that choice), overlapping events, clustering in time, and causality. Use when user asks "is this effect real or noise", "does my signal beat random dates" or "run an event study with a placebo". Without at least two ticker clusters the verdict is never distinguishable_from_placebo, because there is no clustered test to confirm it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"event_returns": "<event_returns>",
"placebo_returns": "<placebo_returns>"
},
"name": "workflow.run_event_study"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for the shuffles, 0 to 4294967295; same input and seed give the same result. Default 1. | |
| alpha | No | Significance level for the verdict, above 0 and below 0.5. Default 0.05. | |
| event_returns | Yes | One return per event over the event window, any consistent unit (percent or fraction). 2 to 5000 values. | |
| event_tickers | No | Optional, one ticker per event return, used to cluster. Omitted: every event is its own cluster. | |
| n_permutations | No | Random shuffles when the exact test is too large, 1000 to 100000. Default 10000. | |
| placebo_returns | Yes | Returns over a window of the same length started on random dates without an event. 2 to 5000 values; event and placebo together at most 5000. | |
| placebo_tickers | No | Optional, one ticker per placebo return. Omitted: every placebo is its own cluster. |