Event Study package is an open-source python project created to facilitate the computation of financial event study analysis.
Project description
Event Study package
Event Study package is an open-source python project created to facilitate the computation of financial event study analysis.
Install
$ pip install eventstudy
Documentation
You can read the full documentation here.
Go through the Get started section to discover through simple
examples how to use the eventstudy
package to run your event study for a single event or a sample of events.
Read the API guide for more details on functions and their parameters.
Example
As an introductory example, we will compute the event study analysis of the announcement of the first iphone, made by Steve Jobs during MacWorld exhibition, on January 7, 2007.
import eventstudy as es
import numpy as np
import matplotlib.pyplot as plt
event = es.EventStudy.FamaFrench_3factor(
security_ticker = 'AAPL',
event_date = np.datetime64('2013-03-04'),
event_window = (-2,+10),
estimation_size = 300,
buffer_size = 30
)
event.plot(AR=True)
plt.show() # use standard matplotlib function to display the plot
event.results(decimals=[3,5,3,5,2,2])
AR | Variance AR | CAR | Variance CAR | T-stat | P-value | |
---|---|---|---|---|---|---|
-5 | -0.053 | 0.00048 | -0.053 ** | 0.00048 | -2.42 | 0.01 |
-4 | 0.012 | 0.00048 | -0.041 * | 0.00096 | -1.33 | 0.09 |
-3 | -0.013 | 0.00048 | -0.055 * | 0.00144 | -1.43 | 0.08 |
-2 | 0.004 | 0.00048 | -0.051 | 0.00192 | -1.15 | 0.13 |
-1 | 0 | 0.00048 | -0.051 | 0.00241 | -1.03 | 0.15 |
0 | -0.077 | 0.00048 | -0.128 ** | 0.00289 | -2.37 | 0.01 |
1 | -0.039 | 0.00048 | -0.167 *** | 0.00337 | -2.88 | 0 |
2 | 0.027 | 0.00048 | -0.14 ** | 0.00385 | -2.26 | 0.01 |
3 | 0.024 | 0.00048 | -0.116 ** | 0.00433 | -1.77 | 0.04 |
4 | -0.024 | 0.00048 | -0.14 ** | 0.00481 | -2.02 | 0.02 |
5 | 0.023 | 0.00048 | -0.117 * | 0.00529 | -1.61 | 0.05 |
... |
Play with the interactive interface
A user-friendly interface has been developped using streamlit and can be accessed here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for eventstudy-0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b217644856f4ef4d46590409b6d02e2840304744a4d36e735c004991b576d5e |
|
MD5 | e9ca03fa36bbb2522ac6f20d72acc13b |
|
BLAKE2b-256 | e2ed8fe6e50c8466a93ad92983e190122dc8a80c1c1d035476a0498668077850 |