~/ home / finance / glossary / rolling regression
Intermediate
Rolling regression is an analysis of the changing of relationships among variables over time, specifically of measures generated from a linear regression. Visualizing regression outputs like correlation, r-squared, beta and the standard error over time can be helpful in the analysis of risk for stocks, portfolios and factors.
Synonym: moving-period regression, rolling window regression
Ann: With this
rolling regression of
alpha, notice how it all came in 1 year?
Jim: Great insight Ann, keep 'em rolling.
This video can be accessed in a new window or App , at the YouTube Channel or from below.
Rolling regression definition for investment modeling (4:44)
The script includes two sections where we visualize and demonstrate the concept of a rolling regression.
We're sitting here in Excel and this is a snippet from our boot camp course (Quant 101).
Here in blue we have 24 monthly returns on a stock Merck and a Market portfolio. Think of this as a 2-year window over which we generated the regression statistics: alpha, beta, standard error, correlation and R-squared.
Now imagine sliding that window down one month, the window now goes from May 2003 to April 2005 and the statistics change.
Our goal is to make our investment models more realistic and accurate, so they adapt to changing relationships, and that we also know about upcoming changes.
Beta, for example, comes from a regression and is used to set expectations on the return and risk of stocks. Notice how the beta changed over time, from 1.43 to 1.28? That's a pretty big move for six months. Let's chart it.
What happened? Well granted this is only a 24-month period, nonetheless we'd have to look at the periods that rolled on here, and rolled off here.
Let's solidify this by creating the rolling regression.
There are four ways to generate regression statistics in Excel, and we'll use the function method here.
First for alpha, or the intercept, use
=INTERCEPT
, open parenthesis, the
y-variable Merck, comma, the x-variable the Market, closed parenthesis
and Enter, for an alpha of -0.0245, which is not good performance, but
look at this cell here, Merck lost 26% in one month alone. Identifying
outliers like this can help with your analysis skills.
Second, for beta, use the same procedures and ranges of data except
use the function called =SLOPE
.
Third is the standard error, which is helpful for finding specific risk
of the stock Merck, and for that we'll use the function
=STEYX
.
Fourth we'll use the function =CORREL
and the same procedures for correlation, which is the interpretable
measure with a scale of -1 to +1.
And finally, R-squared or correlation squared for a range of 0 to 1.
Now copy that row of regressions statistics down and you've done it. Review these with line or bar charts and your portfolio analysis and model building skills are sure to improve.
Click box for answer.
True
Still unclear on rolling regression? Leave a question in the comments section on YouTube or check out the Quant 101 series.
Our trained humans found other terms in the category statistics for finance you may find helpful.
If you like this stuff, you would benefit by subscribing to our YouTube Channel.
~/ home / finance / glossary / rolling regression