Event Study
Perform a market-model event study around a single event date, following the methodology in MacKinlay, A.C. (1997), “Event Studies in Economics and Finance,” Journal of Economic Literature, 35(1), 13-39 – the canonical reference and still the dominant approach used to measure the stock-price impact of corporate events (earnings announcements, M&A deals, index additions/deletions, dividend changes, regulatory actions, etc.).
A market model (Return_t = alpha + beta * Benchmark_Return_t + e_t) is fit via OLS over a clean “estimation window” ending gap_days before the event, then the Abnormal Return on each day of the “event window” around the event is the actual return minus the market-model-predicted expected return. These are cumulated into the Cumulative Abnormal Return (CAR) – the stock-price impact attributable to the event, after stripping out what would have been expected from general market movements alone – along with a t-test of whether CAR is significantly different from zero.
The event_date is the first trading day on which the news can be priced, so for results released after the close it is the next trading day. The CAR runs from pre_event_days before to post_event_days after it (21 trading days by default), which also captures any leak ahead of the announcement. The t-test treats the abnormal returns as independent and uses the residual Variance of the estimation window, so a single event is weak evidence; studies average the CARs of many events of the same kind.
The formula is as follows:
\[\text{Market model:}\;\; \text{Rₜ} = \alpha + \beta \cdot R_{m},\;\; \text{t + epsilonₜ},\;\; \text{fitted by OLS on the daily column (Return by default) of the ticker and the Benchmark over the estimation\_window (250) trading days that end gap\_days (30) trading days before the event}\] \[\text{ARₜ} = \text{Rₜ} - (\text{alphâ} + \text{betâ} \cdot R_{m},\; t),\;\; \text{for} \;\; t = - \text{pre\_event\_days} .. + \text{post\_event\_days} (10 \;\text{and}\; 10)\] \[\text{CAR} = \text{Σ} \text{ARₜ} \;\text{over the}\; L = \text{pre\_event\_days} + \text{post\_event\_days} + 1 \;\text{event-window days}\] \[t = \text{CAR} / \sqrt{L \cdot \text{sigmâ} ^{2}},\;\; \text{with}\; \text{sigmâ} ^{2} = \text{Σepsilon̂ₜ} ^{2} / (N - 2) \text{over the}\; N \;\text{estimation-window days and}\; a \;\text{Student-t distribution with}\; N - 2 \;\text{degrees of freedom}\]Also known as: CAR analysis, abnormal returns analysis, market model event study.
Event Study in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_event_study as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["NVDA"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2022-01-01",
end_date="2023-12-31",
)
# NVDA's abnormal return around its May 2023 earnings release
toolkit.econometrics.get_event_study(event_date="2023-05-25")
Or, after setting up the Finance Toolkit MCP, ask:
What was Nvidia's cumulative abnormal return around its earnings release on 25 May 2023?
Which returns:
| Value | |
|---|---|
| Cumulative Abnormal Return | 0.2044 |
| CAR t-statistic | 1.9468 |
| CAR p-value | 0.0527 |
| Alpha | 0.0018 |
| Beta | 2.0781 |
| Estimation Window Observations | 250 |
Using Your Own Data
get_event_study runs on any data, not only prices: ratios, economic indicators, yield curves or your own dataset. Pass a DataFrame, a Series or a dictionary of them to Econometrics as data, with the dates in the rows or the columns, and set changes to how its changes are calculated: "percentage", "log", "difference" for rates and ratios, or None when the data are changes already. For example, for the monthly unemployment rates of the United States and Germany, where each country is a column:
from financetoolkit import Economics, Econometrics
economics = Economics(start_date="2000-01-01")
unemployment = economics.get_unemployment_rate(
countries=["United States", "Germany"], period="monthly"
)
econometrics = Econometrics(data=unemployment, changes="difference")
Then call econometrics.get_event_study with event_date.
Parameters
get_event_study accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
event_date | str | The date of the event (e.g. “2023-05-04”). Must fall within the Toolkit instance’s daily historical data. | "2024-06-10" |
dependent_ticker | str | None | The ticker being studied. Defaults to the first ticker in the Toolkit instance. | "AAPL" |
column | str | The historical data column to use. Defaults to “Return”. | "Return" |
estimation_window | int | Number of trading days used to estimate the market model. Defaults to 250 (~one trading year). | 120 |
gap_days | int | Number of trading days between the end of the estimation window and the event date. Defaults to 30. | 10 |
pre_event_days | int | Number of trading days before the event date included in the event window. Defaults to 10. | 5 |
post_event_days | int | Number of trading days after the event date included in the event window. Defaults to 10. | 5 |
rounding | int | None | The number of decimals to round the results to. Defaults to None. | 2 |