Hello, I have to perform this following task in a replication step aimed at a research.
"To compute FFC-adjusted returns for day t, I first estimate individual stock factor loadings by regressing delisting-adjusted excess returns on the FFC four factors (including an intercept) on a 120-trading day rolling window from t –150 to t –31 trading days for each stock".
I think I have properly sorted out my dataset so as to have the data in the desired form. Still, I have troubles in performing this time series regression. Moreover, my sample is really big, so I would require something which does not takes ages to run.
Any suggestions on how to carry on?
Thanks,
Riccardo
Hello,
If you have your input data set right (I guess you shifted the target column such that the x-vector for day [t-31] is in the same observation as the target y for day [t]?), then use THE BRUTE FORCE APPROACH as explained in this paper:
Rolling Regressions with PROC FCMP and PROC REG
Mark Keintz, Wharton Research Data Services, University of Pennsylvania
https://www.lexjansen.com/nesug/nesug12/fi/fi08.pdf
After creating the data set RWIN (TYPE=VIEW), like done on page 1, call your procedure (for example proc autoreg) with the by-variable "w".
This BRUTE FORCE APPROACH is of course greedy. Much more efficient techniques can be programmed.
Let us know if the real-time (time-to-completion) of your PROC by w takes too long.
By the way, for time series regression it's better to post your question in the SAS Forecasting and Econometrics board.
Good luck,
Koen
To compute FFC-adjusted returns for day t, I first estimate individual stock factor loadings by regressing delisting-adjusted excess returns on the FFC four factors (including an intercept) on a 120-trading day rolling window from t –150 to t –31 trading days for each stock
this is exactly my issue.
I feel I have sorted out data properly, setting the date of interest t, and the estimation window for each date t. I now have predict the value in t with the estimation period data.
You want to make rolling window datasets (or even rolling window SSCP's - sum-of-squares-and-cross-products) to perform your regressions, correct?
You can take a look at these papers/presentations/comments I made on this subject:
Rapid Rolling Window Regressions via Home Made Sum of Squares and Cross Products (philasug.org)
Rolling Regressions with PROC FCMP and PROC REG (lexjansen.com)
How to create rolling windows with different numbe... - SAS Support Communities
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.