event-study-carslisted
Install: claude install-skill kennethkhoocy/applied-micro-skills
# Event Study: Cumulative Abnormal Returns (CARs)
A complete methodology reference for computing publication-quality CARs with
robust test statistics, matching the rigor of Kaspereit's eventstudy2 (v3.2b)
for Stata. This skill is **generic** — applicable to any market, asset class,
or event type.
## Use the shipped engine first (do not rewrite it)
`scripts/eventstudy.py` is a complete, runnable Python replication of
eventstudy2, validated against the Stata package to floating-point precision
(AR ~1e-8, CAR ~6e-8, CAAR and the implemented test statistics ~1e-7) on a
generic CRSP sample across all four models (FM, COMEAN, MA, RAW). It is generic —
all column names, the model, windows, thin-trading, and log handling are CLI
flags. When a user wants CARs computed, **run this engine**; do not author a new
pipeline.
```bash
python scripts/eventstudy.py --selftest # synthetic self-check, no inputs
python scripts/eventstudy.py \
--returns returns.csv --market market.csv --events events.csv \
--id-col permno --ret-col ret --event-date-col event_date --mkt-col vwretd \
--model FM --car-windows "-1,1;-5,5;-10,10" \
--eswlb -250 --eswub -30 --evwlb -10 --evwub 10 --out-dir out/
```
Inputs are CSV/Parquet: returns (`id, date, ret`), market/factors
(`date, mkt[, factors]`), events (`id, event_date`). Outputs: `ar_panel.csv`,
`car_panel.csv`, `test_statistics.csv`. Requires numpy/pandas/scipy. Run
`--help` for all flags (`--factor-cols smb,hml`, `--model MA`,
`