QM 2 – Evaluating Regression Model Fit and Interpreting Model Results
Simple linear regression asks a narrow question: how much of the movement in one variable can be traced to the movement in a second variable. That is a useful question, but it is almost never the whole question in investment work. Returns, credit outcomes and valuation multiples respond to several forces at once, and those forces are usually correlated with one another. Attributing everything to a single driver therefore produces a coefficient that quietly absorbs the influence of every driver you left out.
Multiple linear regression is the natural extension. It models the linear relation between one dependent variable and two or more independent variables at the same time, so each independent variable is assessed while the others are held fixed. That single change in framing is what makes the technique useful, and it is also what makes the interpretation of the output more demanding.
Three representative investment problems
The curriculum motivates the tool with three situations that are worth carrying in your head, because they show the three distinct purposes a regression can serve.
- Attribution of portfolio returns. A portfolio manager wants to know which underlying factors drive a stock excess return: the size effect, the value effect, profitability, and investment aggressiveness. Estimating a Fama–French five-factor model gives the manager a factor-by-factor decomposition rather than a single beta.
- Prediction of a corporate outcome. A financial adviser asks whether financial leverage, profitability, revenue growth and changes in market share, taken together, indicate that a company is heading towards financial distress. Here the point is forecasting a future state, not explaining a past one.
- Testing an economic proposition. An analyst studies whether different dimensions of country risk, namely political stability, economic conditions, and environmental, social and governance (ESG) considerations, affect equity returns within that country. The regression is being used to test an existing theory.
Those three purposes, identifying relations between variables, testing theories, and forecasting, are the only reasons to run a regression at all. It is worth naming the purpose before specifying the model, because the purpose determines which diagnostics matter most. A model built for forecasting is judged on out-of-sample performance. A model built to test a theory is judged on whether the coefficient of interest is reliably estimated.
One warning belongs here rather than later. Adding explanatory variables is cheap, and modern software will happily estimate a model with a dozen of them. The curriculum is explicit that models with several explanatory variables are acceptable only when they are subject to fundamental justification and to a range of statistical tests. Economic reasoning comes first; the software comes second.
The tools you will meet
Regression estimation is a solved computational problem, and every environment an analyst is likely to use provides it. Knowing the function names is not examinable, but recognising them makes the output tables in this reading much less mysterious.
| Environment | Typical function or command |
|---|---|
| Excel | Regression, within the Data Analysis toolpak |
| R | lm |
| Python | statsmodels.lm; sklearn.linear_model.LinearRegression; scipy.stats.linregress |
| STATA | regress |
| SAS | PROC REG; PROC GLM |
All of these produce the same estimates from the same data. The differences lie in the default diagnostics each one prints alongside the coefficients.
Estimating a regression is one step inside a longer loop. The loop matters because most of the decisions that determine whether a model is any good are taken before the estimation and after it, not during it. The process below is the map you should be able to reconstruct from memory.
Step one: what kind of dependent variable do you have
The first fork is about the variable being explained. If it is continuous, for example a monthly return, the traditional linear regression model is the usual starting point. If it is discrete, for example an indicator that equals one when a company is a takeover target and zero when it is not, a linear model is the wrong shape and the relation should be estimated as a logistic regression instead. This distinction is decided by the nature of the data, not by preference.
Step two: which independent variables, and of what kind
Independent variables may themselves be continuous, such as accounting or market characteristics of a company, or discrete. Discrete explanatory variables are called dummy variables and record membership of a class, such as an industry sector. A model can mix both kinds freely; the fork above concerns only the dependent variable.
Steps three to five: estimate, test, adjust
Once specified, the model is estimated and then interrogated. Two questions are asked in sequence. Do the underlying assumptions of linear regression hold, judged largely from the residuals? And does the model meet the goodness-of-fit standard the analyst has set? A failure on either question sends you back to adjust the specification and re-estimate, not forward. Only when the assumptions hold, the overall fit is significant, and the specification is the best among the candidates considered, does the analyst then ask whether out-of-sample performance is acceptable. A model that clears all of that can be used to identify relations, to test theories, or to forecast.
You are a junior analyst helping to develop several regression models for your industry sector. For each issue below, state the action you should take.
| Issue |
|---|
| The variable being explained equals 1 when a company is a merger target and 0 in every other case. |
| A model has been estimated with five independent variables and not one of them is a significant explanatory variable. |
| The residuals do not look homoskedastic, so a regression assumption is being violated. |
| The regression assumptions hold, the overall fit is significant, and the specification is the best of those considered. |
Issue 1. The dependent variable is discrete rather than continuous, so the first fork sends you left: use logistic regression.
Issue 2. The overall fit is not significant, so the model fails the fit test: adjust the model and re-estimate.
Issue 3. A regression assumption is violated, so the model fails the assumptions test: adjust the model and re-estimate. Note that issues 2 and 3 arrive at the same action from different branches.
Issue 4. Every test has been cleared, so the model can be taken forward: use the model for analysis and prediction.
Start from what a regression is trying to do. The dependent variable moves about its own mean, and the total amount of that movement across the sample is a fixed quantity known as the variation of Y, or equivalently the sum of squares total.
Simple regression attempts to account for that variation using the variation in a single independent variable X. Multiple regression attempts exactly the same thing, but draws on the variations in a set of independent variables X1, X2, up to Xk. The goal has not changed; only the number of tools available to reach it has changed.
Two halves of the same equation
Split the right-hand side in two. Everything involving the k independent variables is the deterministic part of the model: given the values of the explanatory variables and the parameters, it is fully determined. The error term is the stochastic part, the random component that no explanatory variable in the model accounts for. Nearly every assumption you are about to meet is a statement about that error term, which is why the residuals do so much of the diagnostic work later in this reading.
Notice also the notation. The subscript i indexes the observation and runs from 1 to n. On an independent variable there are two subscripts: X2i is the value of the second explanatory variable for observation i. The requirement that n must be larger than k is not decorative. Each independent variable consumes a degree of freedom, so a model estimated on too few observations relative to its size cannot separate the influence of one variable from another.
Parameters and their estimates
The equation above is written in terms of population parameters, which are unknown. What software returns are estimates, conventionally marked with a caret. Writing the estimated relation for a three-variable model:
Note that the error term has disappeared from the estimated equation. That is deliberate: the fitted equation gives the predicted value of the dependent variable, and the residual is what remains when the actual observation is compared with that prediction. The residuals are the empirical stand-in for the unobservable errors, and every diagnostic plot in this reading is built from them.
Two terms complete the vocabulary. The coefficient b0 is the intercept, the expected value of the dependent variable when every independent variable equals zero. The remaining coefficients b1 through bk are the slope coefficients, also called partial regression coefficients or partial slope coefficients. The word “partial” carries the entire meaning, and the next section unpacks it.
A caution about the intercept
The intercept is defined at the point where every explanatory variable equals zero, and that point frequently sits far outside the range of the observed data or describes a state of the world that cannot occur. In a Fama–French regression it happens to be interpretable, because a month in which every factor return is zero is perfectly conceivable and the intercept then measures unexplained excess return. In a regression of company value on revenue and headcount it is not, because a company with zero revenue and zero staff is not in the sample. Report the intercept because the equation needs it, but resist reading economic content into it unless the zero point is genuinely meaningful.
A slope coefficient in a multiple regression must be read with more care than its counterpart in a simple regression. It answers a conditional question: if this one explanatory variable moves by one unit and every other explanatory variable in the model stays exactly where it is, by how much does the dependent variable move? In the model
the coefficient b2 records the change in Y produced by a one-unit change in X2 while X1 and X3 are held constant. Drop X1 and X3 from the model and b2 will generally change, because the surviving variable is then left carrying whatever influence the removed variables used to carry. The number therefore belongs to the model, not to the variable.
Figure 2 also makes clear what “holding constant” does and does not claim. Nothing has been held constant experimentally. The regression is a statistical device that separates the joint movement of the explanatory variables arithmetically. When two independent variables move closely together in the sample, that separation becomes fragile, which is exactly why the independence of the explanatory variables appears as an assumption later.
A worked interpretation of a bond index model
Consider an estimated regression in which the monthly excess returns of a bond index (RET) are explained by the change in monthly government bond yields (BY) and the change in investment-grade credit spreads (CS). Using 60 monthly observations, the estimated model is:
Use the estimated bond index model above to answer the following.
RET = 0.0023 − 5.0585(0.005) − 2.1901(0.001)
RET = 0.0023 − 0.0252925 − 0.0021901
RET = −0.0252, or −2.52%.
Notice the arithmetic of contribution. The yield move contributes roughly ten times as much to the answer as the spread move does, not because its coefficient is only about twice as large, but because the yield change itself is five times as large. Coefficient magnitude and variable magnitude both matter.
Once the coefficients are estimated, generating a predicted value is mechanical. Choose a set of assumed values for the independent variables, substitute them into the fitted equation, and read off the result. The care required lies not in the arithmetic but in three habits: keep the signs of the coefficients straight, use the full precision that was reported rather than a rounded version, and check that the assumed values are inside the range over which the model was estimated.
The most common error in an exam setting is a sign error on a negative coefficient multiplied by a negative assumed value. The second most common is silently rounding the intercept. The worked example below is built around a case where the source curriculum itself illustrates the second point.
An institutional salesperson has read a research report in which you regressed the monthly excess returns of a portfolio (RETRF) on three Fama–French factors. MKTRF is the excess return on the market. SMB captures the return gap that separates small-capitalisation shares from large-capitalisation ones. HML captures the equivalent gap separating value shares from growth shares. Every return here is expressed in whole percentage points, so an input of 1 stands for 1%. The estimated equation is:
MKTRF: if the market excess return rises by 1%, the portfolio return is expected to rise by 0.5892%. The portfolio carries roughly six-tenths of market risk.
SMB: if the size factor return rises by 1%, the portfolio return is expected to fall by 0.8719%. A negative loading on SMB is the signature of a large-capitalisation tilt.
HML: if the value factor return rises by 1%, the portfolio return is expected to fall by 0.056%. The loading is small, so the portfolio is close to style-neutral on the value dimension.
R = 1.534 + 0.5892(1) − 0.8719(4) − 0.0560(−2)
R = 1.534 + 0.5892 − 3.4876 + 0.112
R = −1.2524.
The portfolio is expected to underperform by about 1.25% in that month. The large negative contribution comes from SMB: a loading of −0.8719 applied to a size factor return of 4 costs 3.4876%, which swamps everything else.
A note on precision. The estimated equation reports the intercept as 1.5324, while the solution line above substitutes 1.534, as the source curriculum does, and reaches −1.2524. Carrying the reported intercept of 1.5324 through the same arithmetic gives −1.2540 instead. The difference of 0.0016 is entirely down to the intercept used, and it is a useful reminder that the last digit of an intercept survives all the way into the forecast.
What comes after interpretation
Interpreting coefficients one at a time answers only part of the analyst question. Three further questions follow immediately, and they are the subject of the next learning module rather than this one, but knowing that they are coming shapes how you read the output table in the next section.
- How well does the model account for the dependent variable overall? The question of how much a fitted equation explains is answered by measures of goodness of fit, principally adjusted R-squared, and by analyzing the results assembled in the ANOVA table.
- Are several coefficients jointly significant? A joint hypothesis test asks about two or more coefficients together, rather than testing each one in isolation. You formulate the hypotheses over a group of slope coefficients and evaluate them with an F-test.
- How reliable is a predicted value? A point forecast is of limited use without an interval around it.
For this reading, the ANOVA and goodness-of-fit numbers are treated as descriptive output to be read correctly, not as tests to be performed.
Ordinary least squares (OLS) will return coefficients from any data set you feed it. Whether those coefficients support valid statistical inference is a separate matter, and it depends on a set of conditions being met. Simple regression rested on four assumptions. Multiple regression restates them with small modifications to account for the presence of several explanatory variables, and adds a condition about the relations among those explanatory variables.
- Linearity. The relation connecting the dependent variable to the independent variables is linear in form.
- Homoskedasticity. The spread of the regression residuals is the same at every observation.
- Independence of errors. Observations do not depend on one another, which implies the residuals show no correlation from one observation to the next.
- Normality. The regression residuals follow a normal distribution.
- Independence of independent variables. This condition has two parts. Part 5a requires that the independent variables are not random. Part 5b requires that no exact linear relation exists between two or more of the independent variables, or between combinations of them.
| Assumption | What it requires | Why it matters |
|---|---|---|
| Linearity | A straight-line form connects the dependent and independent variables | A curved relation forced into a straight line produces biased coefficients and patterned residuals |
| Homoskedasticity | Residual spread is constant across all observations | Uneven spread leaves the coefficients usable but corrupts the standard errors and therefore the t-statistics |
| Independence of errors | Residuals are uncorrelated across observations | Correlated residuals understate the true uncertainty, so significance is overstated |
| Normality | Residuals are drawn from a normal distribution | The distributions used for hypothesis tests and confidence intervals depend on it |
| Independence of independent variables | Explanatory variables are not random and are not exactly linearly related | Without it the coefficients cannot be separated from one another, and in the exact case cannot be computed at all |
The independence condition in practice
Part 5b deserves separate attention because it behaves differently from the others. The independence condition is what makes estimation possible in the first place. If one explanatory variable is an exact linear function of another, or of a combination of others, the model simply cannot be estimated: there is no unique set of coefficients that fits the data, because the offending variables carry identical information.
The far more common case is an approximate rather than exact linear relation. Large pairwise correlations between explanatory variables are the usual warning sign. Here the model can be estimated and the software will report coefficients without complaint, but the interpretation becomes problematic. The estimates become unstable, standard errors inflate, and a variable that is genuinely important can appear insignificant. Detecting this condition formally, and the remedies for it, are covered later in the curriculum; at this stage the requirement is to recognise the symptom.
Homoskedasticity made visual
Of the five, homoskedasticity is the one most readily judged by eye, and Figure 3 shows the contrast you are looking for.
Two cautions apply when reading such plots. First, absence of an obvious pattern is evidence, not proof; formal tests exist and come later. Second, in empirical work the assumptions frequently fail to hold, particularly with financial time series. Detecting failures and mitigating them is a large part of applied regression work, and the reason this reading spends so much effort on diagnostics.
To make the diagnostics concrete, the curriculum estimates one model and then examines it from every angle. The data are 10 years of monthly total excess returns for a stock referred to as ABC, giving 120 monthly observations, and the explanatory variables are the three Fama–French factors already introduced: market excess return (MKTRF), size (SMB) and value (HML).
Look at the data before estimating anything
The sensible first move is a scatterplot matrix, also called a pairs plot. It arranges every variable against every other variable in a grid, with the distribution of each variable shown along the diagonal. Figure 4 shows the layout schematically.
Read the matrix in two passes. The first pass runs along the row or column containing the dependent variable and asks whether the relation with each explanatory variable looks linear and which way it points. In the ABC data, ABC excess returns show a positive relation with the market factor MKTRF, no apparent relation with the size factor SMB, and a negative relation with the value factor HML. The second pass looks at the interior cells, where explanatory variables meet one another. SMB and HML show little or no correlation, indicated by a relatively flat fitted line for that pair, and that is a desirable characteristic between explanatory variables because it means assumption 5b is comfortably satisfied.
A third benefit is incidental but valuable: because every data point is plotted, extreme values and outliers are visible before any model is estimated.
The estimated model
Estimating the model in any of the packages listed earlier produces the standard three-block output: a summary of fit, an ANOVA table, and the coefficient block.
| Statistic | Value |
|---|---|
| Multiple R | 0.6238 |
| R-Squared | 0.3891 |
| Adjusted R-Squared | 0.3733 |
| Standard Error | 0.0628 |
| Observations | 120 |
| Source | df | SS | MS | F | Significance F |
|---|---|---|---|---|---|
| Regression | 3 | 0.2914 | 0.0971 | 24.6278 | 0.0000 |
| Residual | 116 | 0.4575 | 0.0039 | ||
| Total | 119 | 0.7489 |
| Term | Coefficient | Standard error | t-Stat. | P-value | Lower 95% | Upper 95% |
|---|---|---|---|---|---|---|
| Intercept | 0.0052 | 0.0061 | 0.8435 | 0.4007 | −0.0070 | 0.0173 |
| MKTRF | 1.2889 | 0.1538 | 8.3791 | 0.0000 | 0.9842 | 1.5935 |
| SMB | −0.5841 | 0.2664 | −2.1922 | 0.0304 | −1.1118 | −0.0564 |
| HML | −0.6810 | 0.2231 | −3.0523 | 0.0028 | −1.1229 | −0.2391 |
Note how the coefficient block confirms the point made in the reveal above: SMB carries a t-statistic of −2.1922 and a P-value of 0.0304, so it is significant at the 5% level despite showing no visible pairwise relation with ABC returns.
Reading the three blocks together
The fit block says the three factors account for 38.91% of the variation in ABC excess returns, and 37.33% once the count of explanatory variables is penalised. Multiple R is simply the square root of R-squared for a model of this form. The standard error of 0.0628 is expressed in the units of the dependent variable, so a typical miss is a little over 6 percentage points of monthly excess return, which is large and a useful corrective to the impression that a 38.91% R-squared conveys.
The ANOVA table splits the sum of squares total into the part the regression accounts for and the part left in the residuals. Its degrees of freedom follow directly from the model size: three explanatory variables give 3 regression degrees of freedom, and 120 observations less 3 explanatory variables less 1 intercept leaves 116 residual degrees of freedom, with 119 in total.
The coefficient block is where interpretation happens. ABC carries a market loading of 1.2889, so it is more volatile than the market with respect to the market factor. It loads negatively on both SMB and HML, which describes a large-capitalisation growth profile. The intercept of 0.0052 is not distinguishable from zero, since its P-value is 0.4007 and its 95% interval spans zero from −0.0070 to 0.0173.
Use only the figures printed in the three output tables above to verify that the output is internally consistent. This is a habit worth building, because a transcription error in an exam vignette is far easier to catch this way than by re-reading the numbers.
Regression: 0.2914 ÷ 3 = 0.0971.
Residual: 0.4575 ÷ 116 = 0.0039.
F is the ratio of the two mean squares, carried at full precision rather than at the rounded values printed: 0.0971333 ÷ 0.0039440 = 24.628, which reproduces the printed 24.6278 to three decimal places. Working instead from the rounded 0.0971 and 0.0039 gives about 24.9, so precision matters here.
The standard error of the regression is the square root of the residual mean square: the square root of 0.0039440 is 0.0628.
1 − (1 − 0.3891) × (119 ÷ 116) = 1 − 0.6109 × 1.02586 = 1 − 0.62670 = 0.3733.
The penalty is worth 0.0158, which is small here because 120 observations comfortably support three explanatory variables. In a model with 20 explanatory variables and 60 observations the gap would be far wider, and that is precisely the situation adjusted R-squared exists to expose.
Half-width: 1.9806 × 0.2231 = 0.4419.
Lower bound: −0.6810 − 0.4419 = −1.1229.
Upper bound: −0.6810 + 0.4419 = −0.2391.
Both match the printed values. The interval lies entirely below zero, which is the same conclusion the P-value of 0.0028 delivers.
With the model estimated, attention shifts to the residuals. Regression software produces a standard set of diagnostic plots, and each one is aimed at a particular assumption. Knowing which plot answers which question is the examinable skill in this part of the reading.
| Plot | What it is used to detect |
|---|---|
| Pairwise scatterplot of the dependent variable against an independent variable | Whether the relation is linear, and where outliers lie |
| Pairwise scatterplot of one independent variable against another | Whether the independence of the independent variables is at risk |
| Residuals against the predicted value | Clustering or fanning that indicates the residuals are not homoskedastic, and potential outliers |
| Residuals against an independent variable | Extreme values of that variable that may distort the estimated parameters, and any residual pattern signalling misspecification |
| Normal Q-Q plot of residuals | Whether the residuals are normally distributed |
Residuals against the predicted value
Start with a scatterplot of the residuals against the predicted values of the dependent variable. For the ABC model, visual inspection shows no directional relation between the two: the cloud sits about a line centred near a residual value of 0.00. That outcome is what you want, because residuals should behave independently of what the model predicts. It suggests the errors have a constant variance and are uncorrelated with one another, so several of the underlying assumptions survive the test.
The same plot flags three residuals as potential outliers, marked with square markers: Months 7, 25 and 95. Outliers are not automatically errors. The right response is to investigate whether some shock outside the model occurred at those points in time, rather than to delete the observations.
Residuals against each independent variable
Next come three plots, one for each factor, showing the residuals against MKTRF, against SMB and against HML in turn. Again, visual inspection reveals no directional relation between the residuals and any explanatory variable, which suggests no assumption of multiple linear regression is being violated. Importantly, the same three potential outliers identified in the residuals-versus-predicted plot reappear in these plots, which corroborates the earlier finding rather than adding a new one.
The normal Q-Q plot
The final diagnostic addresses normality. A normal quantile-quantile plot, or Q-Q plot for short, visualises the distribution of a variable by setting it against a normal distribution. Applied to a regression, it compares the standardised residuals of the model with a theoretical standard normal distribution. If the residuals really are normally distributed, the plotted points should line up along the diagonal.
The diagonal is a benchmark you can check arithmetically. For a normal distribution, 5% of observations fall below −1.65 standard deviations, so the residual sitting at the 5th percentile of the sample should appear at roughly −1.65 on the theoretical axis. Departures tell you where the sample distribution is heavier or lighter than the normal benchmark.
For the ABC model, the picture is largely reassuring with three exceptions. Beyond −2 standard deviations, observations 25 and 95 fall well below the theoretical standard normal range, and observation 7 sits above the diagonal at around +2.5 standard deviations, somewhat above the theoretical range. These are the same three points the residual plots flagged. Setting them aside, the Q-Q plot provides ample evidence that the residuals as a whole are distributed consistently with the normal distribution, so the conclusion is that the model error term is close to normally distributed.
One practical note carries beyond this reading. Fat-tailed residual distributions are a commonly observed feature of financial time series, so a Q-Q plot that bends away at both ends is a familiar sight rather than a rare pathology. What it tells you is that inference based on normal-theory standard errors will understate the frequency of extreme outcomes.
Your model explains the monthly price change of a cryptocurrency (CRYPTO) with two explanatory variables: the price change in gold (GOLD) and the price change in a technology stock index (TECH). The sample runs over five years of monthly data, and you have produced several diagnostic charts alongside the estimated regression. Your research director asks you the following.
Still working on the CRYPTO model, answer the following.
Pulling the reading together
Three things should stay with you from this module. First, the partial slope coefficient is a conditional statement, and it belongs to the model in which it was estimated rather than to the variable itself. Second, five assumptions stand between an estimated equation and valid inference, and four of the five concern the error term. Third, the diagnostic plots are not decoration: each one is matched to a specific assumption, and being able to say which plot answers which question is worth more in an exam than being able to recite the assumptions in order.