Hello,
I am currently working with daily market return data for 10 specific stocks dating back to 1990 (6000+ rows). The returns are reported Monday thru Friday. However, if a particular week had a holiday (in which the market was closed), no return was reported. I also have data for the daily market returns for the entire stock market. I am trying to compare the weekly returns for each specific stock, compared to the overall market returns, so that I can determine the beta of each stock thru a linear regression in excel.
Right now, I am trying to methodically group the daily data, so that I can convert to weekly returns. I am familiar with the grouping feature found in pivot tables, but am unsure how to proceed with the grouping of weeks that had holidays and skipped reporting for that day. After thinking it through, I decided that I should start the weekly grouping on a Tuesday or Wednesday, since most holidays do not fall on these days.
I have tried to group the data outside of a pivot table by using:
=IF($M7="Tuesday",($o7/$o2)-1,"")
The "True" statement in the above formula is the formula for the return for the week. However, because several weeks have inconsistent ranges of reported returns, the resulting returns have gaps where there was a Tuesday holiday, or incorrect values where the range of values were different than the norm.
If anyone has any feedback on how I should proceed, I would GREATLY appreciate it! Thank you for your time!!
-Sally
I am currently working with daily market return data for 10 specific stocks dating back to 1990 (6000+ rows). The returns are reported Monday thru Friday. However, if a particular week had a holiday (in which the market was closed), no return was reported. I also have data for the daily market returns for the entire stock market. I am trying to compare the weekly returns for each specific stock, compared to the overall market returns, so that I can determine the beta of each stock thru a linear regression in excel.
Right now, I am trying to methodically group the daily data, so that I can convert to weekly returns. I am familiar with the grouping feature found in pivot tables, but am unsure how to proceed with the grouping of weeks that had holidays and skipped reporting for that day. After thinking it through, I decided that I should start the weekly grouping on a Tuesday or Wednesday, since most holidays do not fall on these days.
I have tried to group the data outside of a pivot table by using:
=IF($M7="Tuesday",($o7/$o2)-1,"")
The "True" statement in the above formula is the formula for the return for the week. However, because several weeks have inconsistent ranges of reported returns, the resulting returns have gaps where there was a Tuesday holiday, or incorrect values where the range of values were different than the norm.
If anyone has any feedback on how I should proceed, I would GREATLY appreciate it! Thank you for your time!!
-Sally