Calculating monthly regressions with daily data
2 次查看(过去 30 天)
显示 更早的评论
Good afternoon,
I have a time series of daily data for several companies (eg. I have daily data for company X from 1960-1990, then for company Y from 1960-1990, for company Z from 1960-1990 and so on - about 5 million rows of data).
For each company I need to run a regression of itsreturns (consider for instance that the dates are in column 1, codes that identify companies in column 2 and company returns on column 3) against some factors that would be in columns 4, 5 and 6 (whose dates correspond perfectly to the ones of the companies).
The regressions would have to be monthly but using daily values, that is, I want monthly regression outputs (betas and etc). Starting with company X, run a regression for the first 30 days (1 month), then for the next 30 days and etc until that year is finished.
This would mean the regressions would keep calculating for each month for each company until there is no more data.
Is there an efficient way to compute the regressions like this? Thank you so much in advance, I'm new at matlab and I'm finding it not so intuitive to write the code.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!