Skip to main content

A package for conducting event studies

Project description

Event Study Toolkit

event-study-toolkit is a package designed for economists and researchers to conduct event studies on stocks and bond.

GitHub Project Page

Tutorial

Overview

The Event Study Toolkit provides a Python framework to perform event studies. Event studies are empirical investigations that typically focus on the effects of specific events on the stock and/or bond prices of firms. To learn more about event studies, please see the excellent resource by the folks at Eventstudytools

Leveraging the Pandas functionality, this package allows one to design an event study and calculate the relevent statistics. With this toolkit, researchers can measure the impact of specific events on the stock and/or bond prices of involved firms, control for market movements, and perform various statistical tests. Moreover, this package provides access to multiple statistical tests, both parametric and nonparametric for full sample and group level tests.

Features

  1. Data Preparation: Easily load and preprocess your data for analysis.
  2. Model Estimation: Fit your data to different models, both standard and custom, in order to estimate normal returns. Standard models include Market, CAPM, and Fama-French (column names must match up)
  3. Prediction: Predict returns during the event period.
  4. Abnormal Returns: Calculate the abnormal returns, which are the actual returns minus the predicted returns.
  5. Cumulative Abnormal Returns: Group and sum abnormal returns to get cumulative values.
  6. Test Statistics: Obtain various test statistics on both a full-sample and group-level basis.
  7. Rank-based Tests: Implement rank-based tests, such as the Generalized Rank Test and the Wilcoxon Rank-Sum Test.

Significance Tests Available for Use

Full Sample

Group Level

Usage

Below are brief descriptions of the primary functions and their purposes:

  • fitModel(modelType): This function fits the data to the provided model type to estimate normal returns.

  • getPredictedReturns(modelType): Retrieves predicted returns for all groups.

  • getAbnormalReturns(modelType): Calculates abnormal returns for all data.

  • getCARS(modelType): Returns the Cumulative Abnormal Returns (CARs) by summing abnormal returns for specific groups, as well as, other statistics.

  • getFullSampleTestStatistic(modelType): Returns full sample test statistics for the data.

  • getGroupLevelTestStatistics(modelType, GRP): Provides test statistics based on groupings specified by the user.

  • getGRANK(modelType, GRP): Implements the Generalized Rank Z Test for the specified group.

  • getWilcoxon(modelType, GRP): Implements the Wilcoxon Rank-Sum Test for the specified group.

Getting Started

See the following link containing an example notebook: Tutorial

  1. Installation: Ensure you have all the required libraries installed, pip should handle this. This toolkit heavily relies on libraries such as pandas, numpy, and scipy.

  2. Data Preparation:

    • Prepare your data in a suitable format. Ensure you have columns for unique identifiers, return data, and event dates.
    • Load your data into the toolkit using the available methods.
  3. Model Estimation & Prediction:

    • Choose the model type you wish to use. This toolkit allows for standard models and also offers flexibility for custom models.
    • Predict the returns during the event period using the estimated models.
  4. Analysis:

    • Compute abnormal and cumulative abnormal returns.
    • Obtain various test statistics, both on a full-sample and group-level basis.
  5. Advanced Testing: If you need more advanced testing, make use of rank-based tests available in the toolkit.

Contribution

Feel free to contribute to this project by submitting pull requests or raising issues on the project's GitHub page.

License

This project is licensed under the MIT License. Refer to the LICENSE file for more details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

event_study_toolkit-1.0.0.tar.gz (676.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

event_study_toolkit-1.0.0-py3-none-any.whl (676.6 kB view details)

Uploaded Python 3

File details

Details for the file event_study_toolkit-1.0.0.tar.gz.

File metadata

  • Download URL: event_study_toolkit-1.0.0.tar.gz
  • Upload date:
  • Size: 676.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for event_study_toolkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 98f772fd9eed6a2ad6adc9aa865e1805f1aacabd22666dada053fbc3179394ba
MD5 cbbd276b2063607ee942a54839ca45fd
BLAKE2b-256 7c40d76c27cc213bc726e2926f0a2452cd3a85ace1bacadc5f333584080f2d1c

See more details on using hashes here.

File details

Details for the file event_study_toolkit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for event_study_toolkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc83023d4b4bcf9e03aa8be4b76f1039a2d381065246d926195bc30ada31cd0d
MD5 eba32518ce78561989a0a23909131490
BLAKE2b-256 ee2c984b6cdb401be4ce98bc454db436a90de3cde104a11af56abe71b08fa7da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page