Calculating monthly regressions with daily data
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!