R-squared and Goodness of Fit
What R-squared really measures, the share of the wiggle in your outcome that a model explains, how to compute it from residuals, why it always creeps up when you add predictors, and why a low R-squared is normal and often fine in finance.
Prerequisites: Ordinary Least Squares (OLS)
R-squared answers one question: of all the up-and-down variation in the thing you're trying to predict, how much does your model actually account for? If your outcome bounces around a lot and your fitted line follows most of that bouncing, R-squared is high. If your line is nearly flat while the data scatter wildly around it, R-squared is low. It's the most quoted number in regression, and also the most misread.
Start with two piles of "leftover wiggle." First, how far each point sits from the flat line at the average , this is the total variation you could explain. Second, how far each point sits from your fitted line, the part you failed to explain. R-squared is one minus the ratio of the second to the first:
Here is the actual value, is the model's prediction, and is the plain average of the 's. If the model's misses () are tiny compared to the raw spread (), the ratio is near 0 and is near 1. If the model does no better than guessing the average, and . Those leftover misses are the residuals, the vertical gaps below.
A useful shortcut: it's just correlation, squared
In simple regression with one predictor, R-squared is literally the correlation coefficient squared, hence the name. A Correlation of means ; a correlation of (respectable in finance) means , the model explains only 9% of the variation. That single fact deflates a lot of hype: a "strong-looking" correlation of still leaves three quarters of the movement unexplained.
Read as the share of the outcome's variation your model explains: . In simple regression it is just the correlation squared, so a respectable-looking explains a mere 9% of the movement.
Drag below and read the two numbers together. Notice how much faster falls than : at the cloud still looks tilted, yet is only — the line explains just a quarter of the scatter.
Worked example: computing it by hand
Fit a line to five points: , . Ordinary least squares (see Ordinary Least Squares (OLS)) gives the line . The predictions are , so the residuals are and
The mean of is , so the total variation is
Therefore
The line explains about 73% of the spread in . (And indeed , the correlation between and .)
Common pitfalls
- It never goes down when you add predictors. Throw in a useless variable and stays flat or nudges up, purely from fitting noise. That's why people report adjusted , which docks you for every extra parameter you spend. See Degrees of Freedom for the bookkeeping, and Overfitting for the danger.
- High does not mean a good, or causal, model. Two trending series (both drifting up over time) can post an near 1 while being completely unrelated, a spurious regression. A high fit can also come from look-ahead leakage.
- Low is normal in finance and not a failure. Predicting daily returns, an of can be a genuine, tradable edge. Judge return models by out-of-sample profit and risk, not by .
- It says nothing about bias or the size of errors. A model can have a decent yet be systematically off in the tails. Always eyeball the residual plot, not just the single number.
never falls when you add predictors — it creeps up even on pure noise, which is why you report adjusted . And a low is normal in finance: an of on daily returns can be a genuinely tradable edge.
The habit to build: read as "share of variation explained," sanity-check it against the correlation, and never let a big number lull you into skipping the residual plot or the out-of-sample test.
Practice in interviews
Further reading
- Greene, Econometric Analysis (Ch. 3)
- Wooldridge, Introductory Econometrics (Ch. 2–3)