LemaireJean-Baptiste / eventstudy

Event Study package is an open-source python project created to facilitate the computation of financial event study analysis.
GNU General Public License v3.0
60 stars 41 forks source link

Contribution to the computation of daily stock return, i.e. a preprocessing module #21

Open hovinh opened 1 year ago

hovinh commented 1 year ago

Hello,

I wonder if it's a good idea to extend this package to cover the data preprocessing, i.e. transform data into ready-to-consumed before feeding it into this package.

To elaborate further, when I research event study, I realize there are two different ways to compute daily stock return, that are:

Also, when I work on a use case where data could span in both negative and positive zones, I must develop a new variant for the first approach to handle corner cases dealing with 0. I'm new to this and am unsure if an event study can be applied to this case.

Please let me know if this idea is good and if I can contribute to this feature. Thank you :))

hovinh commented 1 year ago

I just realized this is documented in the API. Still, if the case of positive + negative can be an extension, I'm happy to help :)) Or, if the data is missing some of the date, we can populate them with value from the day before.

https://lemairejean-baptiste.github.io/eventstudy/api/eventstudy.Single.import_returns.html#eventstudy.Single.import_returns

bkrayfield commented 9 months ago

@hovinh That's a great idea. I think there should be more messaging around missing data, or missing tickers. Do you want to make a branch?

hovinh commented 9 months ago

Sure, I could start working on it next week and update this thread. I will do a PR once it is ready.

hovinh commented 8 months ago

Hi @bkrayfield , after reviewing the API, I would like to clarify the contribution:

Could you help confirm my approach and let me know any additional implementation?