Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in car_brown_warner_1985 calculation? #12

Open
Debalda opened this issue May 18, 2022 · 4 comments
Open

Error in car_brown_warner_1985 calculation? #12

Debalda opened this issue May 18, 2022 · 4 comments
Assignees

Comments

@Debalda
Copy link

Debalda commented May 18, 2022

Hi Iegor,

hope you are doing well.

I think I have spotted an error in the car_brown_warner_1985 calculation. In your function, you take the mean of daily brown warner:


function (list_of_returns, car_start, car_end, percentage = 90) 
{
    ...
    car_mean <- **mean**(daily_brown_warner_1985_statistics_tidy[, 
        4], na.rm = TRUE)
    statistic <- sum(daily_brown_warner_1985_statistics_tidy[, 
        5], na.rm = TRUE)/sqrt(nrow(daily_brown_warner_1985_statistics_tidy))
  ...
}

However, with this approach I think (not completely sure though) that you take the average across day t and the average across securities i, leading to the daily average abnormal return in the event window instead of the cumulative average abnormal return across the event window.

When calculating in excel, I get the right results editing your code the following way:


{
    ...
    car_mean <- **sum**(daily_brown_warner_1985_statistics_tidy[, 
        4], na.rm = TRUE)
    statistic <- sum(daily_brown_warner_1985_statistics_tidy[, 
        5], na.rm = TRUE)/sqrt(nrow(daily_brown_warner_1985_statistics_tidy))
  ...
}

Note that in the statistics you actually take the sum function.

Let me know what your thoughts are on this.

Kind regards

@Debalda Debalda changed the title Error in car_brown_warner_1985 Error in car_brown_warner_1985 calculation? May 18, 2022
@irudnyts irudnyts self-assigned this Jun 5, 2022
@irudnyts irudnyts added the bug label Jun 5, 2022
@irudnyts
Copy link
Owner

irudnyts commented Jun 5, 2022

@Debalda thanks for that (and sorry for the late reply). I will have a look at it in the upcoming dates.

@Debalda
Copy link
Author

Debalda commented Jun 9, 2022

@irudnyts , sure you're welcome. Curious to get your results on this

@irudnyts
Copy link
Owner

@Debalda thanks for your patience. The test statistics is correct since it uses the sum instead of the mean. The mean abnormal return is only used as an element of the returning list (and it has an appropriate name: mean). It seems that I simply forgot to return the cumulative one (which is the sum).

I will update in the next iteration to return the cumulative abnormal return alongside the mean abnormal return.

Best,
Iegor

@irudnyts irudnyts added enhancement and removed bug labels Jun 14, 2022
@Debalda
Copy link
Author

Debalda commented Jun 15, 2022

Dear Iegor,

thank you very much for having a look. Indeed, your test statistic is calculated right. My remark is about the display of car mean. If I follow mackinlay (1997) I interpret it like summing up the returns of an observation over event days. Iterate this for the number of observations and take the average out of number of observations to get the CAAR. If I understand yours correctly, right now, car_mean currently displays the mean daily return, without cumulating.

Thank you very much for the ongoing support and all the best for your next iteration, your package helped me greatly.

Best
Debalda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants