eventstudy.Multiple.__init__

Multiple.__init__(sample: list, errors=None)

Low-level (complex) way of runing an aggregate of event studies.

Parameters
  • sample (list) – List containing eventstudy.Single objects. You can run independently each eventstudy, aggregate them in a dictionary and compute their aggregate statistics.

  • errors (list, optional) – A list containing errors encountered during the computation of single event studies, by default None.

Example

Run an aggregate of event studies for Apple Inc. 10-K form releases. We loop into a list of dates (in string format). We first convert dates to a numpy.datetie64 format, then run each event study, store them in an events list. Finally, we run the aggregate event study.

1. Import packages: >>> import numpy as np >>> import datetime >>> import eventstudy as es

2. import datas and initialize an empty list to store events: >>> es.Single.import_returns(‘returns.csv’) >>> dates = [‘05/11/2018’, ‘03/11/2017’, ‘26/10/2016’, … ‘28/10/2015’, ‘27/10/2014’, ‘30/10/2013’, … ‘31/10/2012’, ‘26/10/2011’, ‘27/10/2010’] >>> events = list()

3. Run each single event: >>> for date in dates: … formated_date = np.datetime64( … datetime.datetime.strptime(date, ‘%d/%m/%Y’) … ) … event = es.Single.market_model( … security_ticker = ‘AAPL’, … market_ticker = ‘SPY’, … event_date = formated_date … ) … events.append(event)

4. Run the aggregate event study >>> agg = es.Multiple(events)