Linear regression is one of the most widely used statistical tools in quantitative finance. For FRM candidates, mastering least squares regression is not just about passing the examāitās about building a foundation for real-world risk management, where youāll use regression to estimate betas, compute value-at-risk (VaR) sensitivities, and model factor exposures. In this article, weāll break down the concept, walk through a worked example using the BA II Plus calculator, and highlight common pitfalls to avoid.
At its core, linear regression models the relationship between a dependent variable (Y) and one or more independent variables (X). The simplest form, simple linear regression, assumes a straight-line relationship:
Y = α + βX + ε
Where:
- Y is the dependent variable (e.g., portfolio return)
- X is the independent variable (e.g., market return)
- α is the intercept (the value of Y when X = 0)
- β is the slope coefficient (the sensitivity of Y to changes in X)
- ε is the error term (the unexplained variation)
The least squares method estimates α and β by minimizing the sum of squared residualsāthe vertical distances between observed data points and the fitted regression line. This approach ensures the best-fitting line through the data points.
In finance, regression is used extensively:
- Capital Asset Pricing Model (CAPM): Estimating a stockās beta by regressing stock returns against market returns.
- Hedge Ratio Calculation: Determining the optimal hedge ratio for futures contracts.
- Factor Models: Measuring exposure to risk factors like interest rates, inflation, or commodity prices.
Letās work through a practical example. Suppose we have monthly returns for a stock (Y) and the market index (X) over five months:
| Month | Market Return (X) | Stock Return (Y) |
|---|---|---|
| 1 | 2% | 3% |
| 2 | 1% | 1.5% |
| 3 | 4% | 5% |
| 4 | 3% | 4.5% |
| 5 | 5% | 6% |
We want to estimate the stockās beta (β) and alpha (α) using least squares regression.
2nd then CLR WORK (the CE|C key).2nd then DATA (the 7 key). Youāll see X01=0.2 then ENTER, press ā to move to Y01. Type 3 then ENTER, press ā to move to X02.2nd then STAT (the 8 key). Youāll see LIN (linear regression).ā to scroll through the results. Youāll see:n = 5 (number of observations)xĢ = 3.0 (mean of X)ȳ = 4.0 (mean of Y)Sx = 1.5811 (sample standard deviation of X)Sy = 1.8708 (sample standard deviation of Y)r = 0.9954 (correlation coefficient)a = 0.5 (intercept, α)b = 1.1667 (slope, β)s = 0.1667 (standard error of the estimate)The least squares regression equation is:
Y = 0.5 + 1.1667X
This means the stock has a beta of 1.1667āitās more volatile than the market. The alpha is 0.5%, suggesting the stock outperforms the market by 0.5% per month on average, holding market risk constant.
You can also calculate R-squared by squaring the correlation coefficient: r² = 0.9954² = 0.9908. This indicates that 99.08% of the stockās return variation is explained by market returns.
Pro Tip: If youāre studying on the go, the RBA Calculator (TI BA II Plus iOS app) replicates the exact keystrokes of the physical calculator, making it perfect for practicing regression problems on your phone. You can find it here: RBA Calculator on the App Store.
Even seasoned FRM candidates stumble on regression questions. Here are the most frequent errors:
The slope (β) measures the sensitivity of Y to X, while the intercept (α) is the expected value of Y when X = 0. In finance, α is often called āalphaā and represents excess returnāitās not the same as the slope. Always double-check which coefficient the question asks for.
The least squares method assumes that errors are independently and identically distributed with a mean of zero and constant variance. If you forget to check for heteroscedasticity or autocorrelation in the residuals, your regression results may be unreliableāespecially when using time-series data like stock returns.
R-squared measures the proportion of variance in Y explained by X. A high R-squared doesnāt necessarily mean X causes Yāit could be spurious correlation. For example, regressing two unrelated stocks over a short period might yield a high R-squared purely by chance.
On the BA II Plus, the default statistics mode is LIN (linear). If you accidentally select L (logarithmic) or EXP (exponential), your results will be wrong. Always confirm that LIN is displayed before reading the output.
Q: Whatās the difference between simple and multiple linear regression?
A: Simple regression uses one independent variable (X) to predict Y. Multiple regression uses two or more independent variables. In FRM, youāll mostly encounter simple regression in exam questions, but multiple regression is common in factor models and risk decomposition.
Q: How do I interpret the slope coefficient in a financial context?
A: The slope (β) represents the change in Y for a one-unit change in X. In CAPM, β is the stockās sensitivity to market returns. A β of 1.5 means the stock is expected to move 1.5% for every 1% market move. A β below 1 indicates lower volatility than the market.
Q: What is the standard error of the estimate (s) used for?
A: The standard error measures the average distance that observed values fall from the regression line. Itās used to construct confidence intervals and perform hypothesis tests on the regression coefficients. A smaller standard error indicates a better fit.
Q: Can I use the BA II Plus for multiple regression?
A: No. The BA II Plus only supports simple linear regression (one independent variable). For multiple regression, youāll need to use Excel, Python, or a financial calculator with more advanced capabilities.
While the FRM exam tests your ability to calculate regression coefficients and interpret results, the real workplace demands more nuanced application. Hereās how linear regression shows up in practice:
In a trading or asset management role, youāll regress daily or monthly returns of a stock against a benchmark index like the S&P 500. The least squares slope gives you the beta, which is critical for calculating the cost of equity (via CAPM) and adjusting portfolio weights.
In derivatives trading, you might need to hedge a portfolio using futures. The optimal hedge ratio is the slope of a regression of spot price changes on futures price changes. This minimizes the variance of the hedged positionāa direct application of least squares regression.
Risk managers often run multiple regressions to determine how a portfolio is exposed to various risk factors (e.g., interest rates, credit spreads, equity volatility). The coefficients from these regressions help construct factor-neutral portfolios or assess concentration risk.
Regression models can be used to predict portfolio losses under hypothetical market scenarios. By regressing historical portfolio returns on macroeconomic variables, you can estimate how the portfolio might perform under different stress conditions.
Linear regression is more than a formulaāitās a bridge between theoretical statistics and practical risk management. By mastering least squares estimation and the BA II Plus keystrokes, youāll be well-prepared for the FRM exam and for the analytical challenges youāll face in the workplace. Remember to always check your calculator settings, interpret coefficients in context, and be mindful of the assumptions underlying the regression model. With practice, regression will become second natureāand the RBA Calculator app is a handy companion for honing your skills wherever you are.
RBA Calculator handles all TVM, NPV/IRR and bond calculations, matching the BA II Plus used in exams 100%.
Free Download on App StoreDon't want to download?Try the web calculators ā