Package: EventStudy 0.66.0

Simon Mueller

EventStudy: Event Study Analysis

Financial event study analysis. Implements the classical event study methodology of MacKinlay (1997) <https://www.jstor.org/stable/2729691> with multiple return models: market model, market adjusted, comparison period mean adjusted, Fama and French three-factor (1993) <doi:10.1016/0304-405X(93)90023-5> and five-factor (2015) <doi:10.1016/j.jfineco.2014.10.010>, Carhart (1997) four-factor <doi:10.1111/j.1540-6261.1997.tb03808.x>, generalized autoregressive conditional heteroskedasticity (GARCH; Bollerslev, 1986) <doi:10.1016/0304-4076(86)90063-1>, rolling window, and dynamic conditional correlation GARCH (DCC-GARCH; Engle, 2002) <doi:10.1198/073500102288618487>. Provides parametric and non-parametric test statistics, including the standardized cross-sectional test of Boehmer, Musumeci and Poulsen (1991) <doi:10.1016/0304-405X(91)90032-F> and its cross-correlation adjustment by Kolari and Pynnonen (2010) <doi:10.1093/rfs/hhq072>; buy-and-hold abnormal returns (Barber and Lyon, 1997) <doi:10.1016/S0304-405X(96)00890-2>; volume and volatility event studies; cross-sectional regression; intraday event studies; panel difference-in-differences event studies with the estimators of Callaway and Sant'Anna (2021) <doi:10.1016/j.jeconom.2020.12.001>, de Chaisemartin and D'Haultfoeuille (2020) <doi:10.1257/aer.20181169>, and Borusyak, Jaravel and Spiess (2024) <doi:10.1093/restud/rdae007>; synthetic control methods (Abadie, Diamond and Hainmueller, 2010) <doi:10.1198/jasa.2009.ap08746>; wild bootstrap inference; multiple testing corrections; power analysis via simulation; data download helpers; automated reporting; and visualization tools. Results can be exported to comma-separated values (CSV), 'Excel', or 'LaTeX'.

Authors:Simon Mueller [cre, aut]

EventStudy_0.66.0.tar.gz
EventStudy_0.66.0.zip(r-4.7-any)EventStudy_0.66.0.zip(r-4.6-any)
EventStudy_0.66.0.tar.gz(r-4.7-any)EventStudy_0.66.0.tar.gz(r-4.6-any)
EventStudy_0.66.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
EventStudy/json (API)

# Install 'EventStudy' in R:
install.packages('EventStudy', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sipemu/eventstudy/issues

Pkgdown/docs site:https://sipemu.github.io

Datasets:
  • dieselgate - Volkswagen "Dieselgate" Multi-Automaker Event Study Dataset
  • earnings_surprises - Earnings Surprise Multi-Firm Event Study Dataset

On CRAN:

Conda:

4.98 score 4 stars 119 scripts 127 downloads 81 exports 66 dependencies

Last updated from:d538aab652. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK289
source / vignettesOK329
linux-releaseOK326
windows-develOK188
windows-releaseOK263
wasm-releaseOK168

Exports:adjust_p_valuesAnthropicProviderARTTestBHARModelBHARTTestBMPTestbootstrap_testcalculate_statisticsCalendarTimePortfolioTestcar_by_groupcar_quantilesCarhart4FactorModelCARTTestComparisonPeriodMeanAdjustedModelcross_sectional_regressionCSectTTestCustomProviderDCCGARCHModeldownload_factor_datadownload_risk_free_ratedownload_stock_dataes_advisees_colourses_diagnosticses_kbes_reportestimate_panel_event_studyestimate_synthetic_controlEventStudyTaskexport_resultsFamaFrench3FactorModelFamaFrench5FactorModelfit_modelflag_robustnessGARCHModelGeneralizedSignTestgenerate_reportIntradayEventStudyTaskKolariPynnonenTestLinearFactorModelLogReturnMarketAdjustedModelMarketModelmodel_diagnosticsModelBaseMultiEventStatisticsSetnonparametric_intraday_testOpenAICompatProviderPanelEventStudyTaskParameterSetPatellZTestplot_car_distributionplot_diagnosticsplot_event_studyplot_panel_event_studyplot_stocksplot_synthetic_controlprepare_event_studyprepare_intraday_event_studypretrend_testproviderProviderBaseRankTestrecommend_statreport_tableReturnCalculationRollingWindowModelrun_event_studysc_placebo_testSignTestSimpleReturnsimulate_event_studySingleEventStatisticsSetStatisticsSetBaseSyntheticControlTaskTestStatisticBasetheme_eventstudytidy.EventStudyTaskvalidate_taskVolatilityModelVolumeModel

Dependencies:askpassbase64encbslibcachemclicpp11crosstalkcurldata.tabledigestdistributionaldplyrevaluatefarverfastmapfontawesomefsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetshttrisobandjquerylibjsonliteknitrlabelinglaterlazyevallifecyclemagrittrmemoisemimenumDerivopensslotelpillarpkgconfigplotlypromisespurrrR6rappdirsRColorBrewerRcpprlangrmarkdownS7sassscalesstringistringrsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunyaml

Automated Event Study Reports
Introduction | Requirements | Basic Usage | Customizing the Report | Title and Author | Selecting Sections | Summary Only | Including Cross-Sectional Analysis | Output Formats | Panel Event Study Reports | Programmatic Report Generation

Last update: 2026-10-21
Started: 2026-10-21

Creating Custom Models
Introduction | The ModelBase Interface | Example: Industry-Adjusted Model | Using the Custom Model | Example: Excess Return Model | Using Factor Models | Key Points

Last update: 2026-10-21
Started: 2026-10-21

Creating Custom Test Statistics
Introduction | The TestStatisticBase Interface | Example: Wilcoxon Signed-Rank Test (Single Event) | Example: Kolmogorov-Smirnov Test (Multi-Event) | Registering Custom Statistics | Using Custom Statistics in the Pipeline | Built-in Test Statistics | Key Points

Last update: 2026-10-21
Started: 2026-10-21

Cross-Sectional Analysis of Event Study Results
Introduction | Running the Event Study First | Cross-Sectional Regression | Basic Usage | Robust Standard Errors | Custom CAR Window | Accessing the Underlying Data | Group Comparisons | car_by_group() | Custom CAR Window for Groups | CAR Quantiles | Visualizing the CAR Distribution | Histogram | Histogram by Group | A Complete Cross-Sectional Workflow | Tips and Best Practices | References

Last update: 2026-10-21
Started: 2026-10-21

Diagnostics and Validation for Event Studies
Introduction | Setup: Running an Event Study | Step 1: Validate the Task | What It Checks | 1. Event Date Exists | 2. Sufficient Estimation Window | 3. Time Series Gaps | 4. Window Overlap | 5. Thin Trading | Using Validation Results | Step 2: Model Diagnostics | Diagnostic Tests Explained | Shapiro-Wilk Normality Test (shapiro_p) | Durbin-Watson Statistic (dw_stat) | Ljung-Box Test (ljung_box_p) | First-Order Autocorrelation (acf1) | Sigma and R-squared (sigma, r2) | Diagnostics for a Single Event | Interpreting Diagnostics as a Table | Step 3: Visual Diagnostics | Comparing Diagnostics Across Events | Step 4: Pre-trend Testing | Interpreting Results | Pre-trend Test by Group | What to Do When Pre-trends Are Detected | A Complete Diagnostic Workflow | Decision Guide | References

Last update: 2026-10-21
Started: 2026-10-21

Downloading Stock and Factor Data
Introduction | Downloading Stock Data | Multiple Stocks | Format for EventStudyTask | Raw Format | Downloading Factor Data | Fama-French 3-Factor | Fama-French 5-Factor | Monthly Frequency | Using with Factor Models | Downloading Risk-Free Rate | Column Name Mapping

Last update: 2026-10-21
Started: 2026-10-21

Factor Models, GARCH, and Buy-and-Hold Abnormal Returns
Introduction | Factor Data: The factor_tbl | Required Columns by Model | Sourcing Factor Data | Fama-French Three-Factor Model | Running the Study | Inspecting Factor Loadings | Fama-French Five-Factor Model | Carhart Four-Factor Model | GARCH(1,1) Model | Requirements | GARCH-Specific Results | When to Use GARCH | Buy-and-Hold Abnormal Returns (BHAR) | Motivation | Running a BHAR Study | Interpreting BHAR Results | BHAR vs. CAR: When Does It Matter? | Comparing Models | Summary | References

Last update: 2026-10-21
Started: 2026-10-21

Gallery

Last update: 2026-10-21
Started: 2026-10-21

Inference and Robustness: HAC, Bootstrap, and Multiple Testing
Introduction | HAC Standard Errors | Kolari-Pynnonen Test | Wild Bootstrap Inference | Multiple Testing Corrections | Combining Approaches | References

Last update: 2026-10-21
Started: 2026-10-21

Intraday Event Studies with EventStudy
Introduction | Data Structure | The IntradayEventStudyTask | Non-Parametric Test | Interpreting Results | Plotting Results | References

Last update: 2026-10-21
Started: 2026-10-21

Getting Started with EventStudy
Introduction | Quick Start | Example: Dieselgate | Initialization | Define the Event Study | Execute the Event Study | Visualize the Results | Cumulative Abnormal Return (CAR) | Cumulative Average Abnormal Return (CAAR) | Next Steps | Conclusion

Last update: 2026-10-21
Started: 2026-10-21

Modern Difference-in-Differences Estimators
Introduction | Data Setup | TWFE (Default) | Sun-Abraham | Callaway-Sant'Anna | de Chaisemartin-D'Haultfoeuille | Borusyak-Jaravel-Spiess | Comparing Estimators | When to Use Which? | References

Last update: 2026-10-21
Started: 2026-10-21

Panel Event Studies: A Guide Following Miller (2023)
Introduction | Data Structure (Miller Section I) | Dataset A: Single-Cohort Design | Dataset B: Staggered Multi-Cohort Design | Creating Tasks | The Estimating Equation (Miller Section II) | Static TWFE: The Single-Coefficient Model (Miller Section II.A) | Dynamic TWFE: Event-Time Coefficients (Miller Section II.B) | Reference Period and Normalization (Miller Section III) | Endpoint Binning (Miller Section IV) | Staggered Treatment and Heterogeneous Effects (Miller Section V) | The TWFE Problem | Sun & Abraham (2021) Interaction-Weighted Estimator | Comparing TWFE and Sun & Abraham | Pre-trend Testing (Miller Section VI) | Visual Inspection | Joint Test for Pre-trends | Miller's Caution | Reporting and Counterfactuals (Miller Section VII) | Statistical Inference (Miller Section VIII) | Clustered Standard Errors | How Many Clusters Are Enough? | Practical Checklist | References

Last update: 2026-10-21
Started: 2026-10-21

Result Extraction and Export
Introduction | Running the Example | Extracting Results Programmatically | Abnormal Returns | Cumulative Abnormal Returns | Average Abnormal Returns (AAR/CAAR) | Model Statistics | The tidy() Method | Tidy AR | Tidy CAR | Tidy AAR | Tidy Model | Exporting Results | Export to CSV | Export to Excel | Export to LaTeX | Cross-Sectional Analysis of CARs | Visualization | Summary

Last update: 2026-10-21
Started: 2026-10-21

Monte Carlo Simulation and Power Analysis
Introduction | Basic Usage | Power Analysis | Varying Effect Size | Varying Sample Size | Customizing the DGP | Different Test Statistics | Rejection by Day | Seed Reproducibility

Last update: 2026-10-21
Started: 2026-10-21

Statistical Conventions and Formula Audit
Purpose | Audit methodology | Return models | Market Model (MacKinlay 1997) | Market Adjusted Model | Comparison Period Mean Adjusted Model | Fama-French Three-Factor Model | Fama-French Five-Factor Model | Carhart Four-Factor Model | Custom Model | BHAR Model (Barber-Lyon 1997) | Volume Model | Volatility Model | Rolling-Window Model | GARCH Model | DCC-GARCH Model | Test statistics | Multi-event all-NA exclusion (2026-09-24 re-evaluation, item A2) | AR / CAR t-tests (ARTTest, CARTTest) | BHAR t-test (BHARTTest) | Cross-Sectional t-test (CSectTTest) | Patell Z-test (PatellZTest) | BMP test (BMPTest) | Sign test (SignTest) | Generalized Sign test (GeneralizedSignTest) | Rank test (RankTest) | Calendar-Time Portfolio test (CalendarTimePortfolioTest) | Kolari-Pynnonen test (KolariPynnonenTest) | PermutationTest (unwired stub) | TestStatisticBase confidence_type (2026-09-24 re-evaluation, item A10) | Cross-sectional regression (2026-09-24 re-evaluation, item A5) | Wild bootstrap inference (2026-09-24 re-evaluation, item A12) | Audit log | Audit summary

Last update: 2026-10-21
Started: 2026-10-21

Synthetic Control Methods
Introduction | Data Setup | Creating the Task | Estimation | quadprog (default) | optim (fallback) | Results | Visualization | Trajectory Plot | Gap Plot | Placebo Plot | Placebo Test | References

Last update: 2026-10-21
Started: 2026-10-21

The Grounded AI Advisor: A Dieselgate Multi-Automaker Walkthrough
Why the advisor exists | How it works: two layers | The multi-automaker dieselgate example | VW's single-firm crash | Seeing the crash: VW abnormal returns with confidence interval | VW cumulative abnormal return with confidence band | Multi-group results: idiosyncratic vs. contagion | Group CAAR comparison plot | What runs offline (deterministic) | Diagnostics | Recommended statistics | Robustness flags | What the LLM adds (shown static) | Why this block is not evaluated at build time | Summary

Last update: 2026-10-21
Started: 2026-10-21

Time-Varying Beta Models: Rolling Window and DCC-GARCH
Introduction | Rolling Window Model | Basic Usage | Custom Window Size | Diagnostics | How it Works | DCC-GARCH Model | Requirements | Custom GARCH Orders | Convergence Notes | Comparison

Last update: 2026-10-21
Started: 2026-10-21

Volume and Volatility Event Studies
Introduction | Data Requirements | Volume Event Study | Volatility Event Study | Setup | Running the Volume Study | Log Transform | Interpreting Results | Visualization | Running the Volatility Study | Combining Price, Volume, and Volatility | Diagnostics | Export | References

Last update: 2026-10-21
Started: 2026-10-21

Readme and manuals

Help Manual

Help pageTopics
Adjust P-Values for Multiple Testingadjust_p_values
AnthropicProviderAnthropicProvider
Abnormal Return T Statistic (ART)ARTTest
Buy-and-Hold Abnormal Returns (BHAR) ModelBHARModel
Buy-and-Hold Abnormal Return T Test (BHARTTest)BHARTTest
BMP Test (Boehmer, Musumeci, Poulsen 1991)BMPTest
Wild Bootstrap Inference for Event Studiesbootstrap_test
Calculate test statisticscalculate_statistics
Calendar-Time Portfolio TestCalendarTimePortfolioTest
Compare CARs Across Groupscar_by_group
CAR Quantilescar_quantiles
Carhart Four-Factor ModelCarhart4FactorModel
Cumulative Abnormal Return T Statistic (CART)CARTTest
Comparison Period Mean Adjusted ModelComparisonPeriodMeanAdjustedModel
Cross-Sectional Regression of CARscross_sectional_regression
Cross-Sectional T Test (CSectTTest)CSectTTest
CustomProviderCustomProvider
DCC-GARCH ModelDCCGARCHModel
Degenerate-Input Contract for EventStudy Modelsdegenerate-input-contract
Volkswagen "Dieselgate" Multi-Automaker Event Study Datasetdieselgate
Download Factor Datadownload_factor_data
Download Risk-Free Ratedownload_risk_free_rate
Download Stock Datadownload_stock_data
Earnings Surprise Multi-Firm Event Study Datasetearnings_surprises
Grounded AI Advice for Event Study Resultses_advise
EventStudy Colour Palettees_colours
Harvest Diagnostics from a Fitted EventStudyTaskes_diagnostics
Access the EventStudy Grounding Knowledge Basees_kb
One-Call Event Study Report Orchestratores_report
Estimate Panel Event Studyestimate_panel_event_study
Estimate Synthetic Controlestimate_synthetic_control
EventStudy Deprecation Policyeventstudy-deprecation
Return-Shape Contracts for EventStudy Pipeline Resultseventstudy-shape-contracts
Initialization of an Event Study task.EventStudyTask
Export Event Study Resultsexport_results
Fama-French Three-Factor ModelFamaFrench3FactorModel
Fama-French Five-Factor ModelFamaFrench5FactorModel
Train the defined model on each event and calculate the abnormal return.fit_model
Flag Robustness Issues via Offline KB Matchingflag_robustness flag_robustness.default flag_robustness.es_diagnostics flag_robustness.EventStudyTask
Format method for Advice objectsformat.Advice
Format method for es_advice objectsformat.es_advice
Format Cross-Sectional Regression Resultsformat.es_cross_sectional
Format method for es_diagnostics objectsformat.es_diagnostics
Format method for es_simulation objectsformat.es_simulation
Format method for EventStudySummaryformat.EventStudySummary
GARCH ModelGARCHModel
Generalized Sign Test (Cowan 1992)GeneralizedSignTest
Generate Event Study Report (Multi-Format)generate_report
Intraday Event Study TaskIntradayEventStudyTask
Kolari-Pynnoenen Adjusted BMP TestKolariPynnonenTest
Linear Factor Model BaseLinearFactorModel
R6 class for log return calculationLogReturn
Market Adjusted ModelMarketAdjustedModel
Market ModelMarketModel
Model Diagnostics for Event Studymodel_diagnostics
ModelBaseModelBase
Multi Event Statistic SetMultiEventStatisticsSet
Non-Parametric Intraday Event Study Testnonparametric_intraday_test
OpenAICompatProviderOpenAICompatProvider
Panel Event Study TaskPanelEventStudyTask
Event Study Parameter SetParameterSet
Patell or Standardized Residual Test (PatellZTest)PatellZTest
Plot CAR Distributionplot_car_distribution
Plot Model Diagnosticsplot_diagnostics
Plot Event Study Resultsplot_event_study
Plot Panel Event Study Resultsplot_panel_event_study
Plot Stocksplot_stocks
Plot Synthetic Control Resultsplot_synthetic_control
Prepare data for an Event Studyprepare_event_study
Prepare Intraday Event Studyprepare_intraday_event_study
Pre-trend Test for Event Studypretrend_test
Print method for Advice objectsprint.Advice
Print method for es_advice objectsprint.es_advice
Print Cross-Sectional Regression Resultsprint.es_cross_sectional
Print method for es_diagnostics objectsprint.es_diagnostics
Print method for EventStudySummaryprint.EventStudySummary
Construct a Grounded AI Advisor providerprovider
ProviderBaseProviderBase
Rank Test (Corrado 1989)RankTest
Recommend Test Statistics via Offline KB Matchingrecommend_stat recommend_stat.default recommend_stat.es_diagnostics recommend_stat.EventStudyTask
Render a data frame as a styled table (HTML / PDF / Word / Markdown)report_table
ReturnCalculationReturnCalculation
Rolling Window ModelRollingWindowModel
Run a Complete Event Studyrun_event_study
Placebo Test for Synthetic Controlsc_placebo_test
Sign Test for Multiple EventsSignTest
R6 class for simple return calculationSimpleReturn
Simulate Event Study for Power Analysissimulate_event_study
Single Event Statistic SetSingleEventStatisticsSet
Adds a test statistic to this container.StatisticsSetBase
Synthetic Control TaskSyntheticControlTask
TestStatisticBaseTestStatisticBase
EventStudy ggplot2 Themetheme_eventstudy
Tidy Event Study Resultstidy.EventStudyTask
Validate an Event Study experimentvalidate_task
Volatility Event Study ModelVolatilityModel
Volume Event Study ModelVolumeModel