What Is Regression? Regression Analysis in Finance Explained
By Forex & Brokers DeskUpdated Nov 10, 2026

Definition
Regression is a statistical method that fits an equation, usually a straight line, to data to estimate how a dependent variable changes when one or more independent variables change.
Key takeaways
- Ordinary least squares picks the line that minimizes the sum of squared residuals between actual and predicted values.
- A stock's beta is the slope from regressing its returns on the returns of a broad market index such as the S&P 500.
- Adding variables never lowers R², so adjusted R² penalizes extra variables to discourage padding the model.
- Regressing one trending price series on another can show a high R² even when the two series are unrelated.
Regression is a statistical method that estimates how a dependent variable changes when one or more independent variables change. It fits an equation to observed data, usually a straight line, so the relationship can be measured, tested for statistical significance and used to make predictions. In finance, regression underlies tools such as a stock’s beta, factor models of returns and hedge ratios.
What Is Regression?
The variable you want to explain or predict is the dependent variable (Y). The variables you use to explain it are the independent or explanatory variables (X). An economist might treat household consumption as Y and income as X. An equity analyst might treat a stock’s monthly return as Y and the market’s monthly return as X.
Regression comes in several forms:
- Simple linear regression uses one independent variable.
- Multiple linear regression uses two or more independent variables.
- Nonlinear regression fits curves rather than straight lines when the relationship bends. Examples are exponential, logarithmic or polynomial forms.
- Logistic regression predicts the probability of a yes/no outcome, such as whether a borrower defaults.
People often treat “linear regression” and “OLS” as the same thing. Linear regression is the model, a straight-line relationship. OLS is the most common method for estimating that model’s coefficients.
How Regression Works
The regression equation
The general form of a linear regression model is:
Y = a + b₁X₁ + b₂X₂ + … + bₜXₜ + u
where:
- Y is the dependent variable being explained or predicted
- X₁ to Xₜ are the explanatory variables
- a is the intercept, the value of Y when every X equals zero
- b₁ to bₜ are the coefficients (slopes), showing how much Y changes for a one-unit change in each X
- u is the error term, the part of Y the model does not explain
With one explanatory variable, this reduces to Y = a + bX + u, which plots as a straight line.
Least squares
Ordinary least squares chooses the intercept and slopes that make the sum of squared residuals as small as possible. A residual is the vertical distance between an actual data point and the value the line predicts for it. Squaring makes all distances positive and penalizes large misses more heavily than small ones.
For simple regression, the OLS estimates have a closed form:
- Slope b = Σ[(X − mean of X)(Y − mean of Y)] ÷ Σ(X − mean of X)²
- Intercept a = mean of Y − b × mean of X
In practice, software does the calculation, especially for multiple regression, where the arithmetic is matrix-based.
Example of Regression: Estimating a Stock’s Beta
The best-known regression in finance comes from the capital asset pricing model (CAPM). Analysts regress a stock’s returns against the returns of a broad market index, such as the S&P 500. The slope of that line is the stock’s beta, its sensitivity to market moves. Strictly, CAPM uses excess returns (returns minus the risk-free rate). This example uses raw returns to keep the arithmetic visible.
Hypothetical data, monthly returns in percent over five months:
| Month | Index return (X) | Stock return (Y) |
|---|---|---|
| 1 | −2 | −1 |
| 2 | −1 | 0 |
| 3 | 0 | 2 |
| 4 | 1 | 1 |
| 5 | 2 | 3 |
Step 1: Means. Mean X = 0. Mean Y = 1.
Step 2: Slope. The X deviations are −2, −1, 0, 1, 2. The Y deviations are −2, −1, 1, 0, 2. The sum of their products is 4 + 1 + 0 + 0 + 4 = 9. The sum of squared X deviations is 4 + 1 + 0 + 1 + 4 = 10. Slope b = 9 ÷ 10 = 0.9.
Step 3: Intercept. a = 1 − 0.9 × 0 = 1.0.
The fitted equation is Stock return = 1.0 + 0.9 × Index return.
Step 4: Fit quality. The predicted values are −0.8, 0.1, 1.0, 1.9 and 2.8, which leaves residuals of −0.2, −0.1, 1.0, −0.9 and 0.2. The sum of squared residuals is 1.9. The total sum of squares of Y around its mean is 10. So R² = 1 − 1.9 ÷ 10 = 0.81: in this sample, the index explains 81% of the variation in the stock’s returns.
A beta of 0.9 means that a 1-percentage-point move in the index was associated with a 0.9-point move in the stock, in the same direction. The intercept of 1.0 means the stock returned about 1% in a month when the index was flat. Five observations are far too few to rely on. Real beta estimates typically use years of monthly or weekly data, and the result depends on the period and frequency chosen.
Interpreting a Regression Model
The main outputs of a regression are:
- Coefficients. In a multiple regression, each coefficient is the expected change in Y for a one-unit change in that variable, holding the other variables constant. Take a hypothetical model Y = 1.0 + 3.2X₁ − 2.0X₂. If X₁ rises by 2 while X₂ stays fixed, Y is expected to rise by 6.4. If X₂ rises by 1 while X₁ stays fixed, Y is expected to fall by 2.0. When both are zero, the predicted Y is 1.0.
- Standard errors and t-statistics. These measure how precisely each coefficient is estimated.
- P-values. A p-value is the probability of seeing a coefficient at least this far from zero if the true effect were zero. A small p-value, conventionally below 0.05, is called statistically significant. Significance is not the same as economic importance: a tiny effect can be significant in a large sample.
- R² and adjusted R². R² is the share of Y’s variation the model explains, from 0 to 1. Adding variables never lowers R², so adjusted R² penalizes extra variables to discourage padding the model.
- Residuals. A plot of the errors reveals patterns the line missed, such as curvature or variance that grows over time.
Assumptions Behind Linear Regression
OLS estimates and their p-values are reliable only when certain conditions hold, at least approximately:
- Linearity. The relationship between the X variables and Y is linear in the coefficients.
- Independent errors. Residuals are not correlated with one another. Financial time series often violate this through autocorrelation, where one period’s error resembles the last.
- Homoskedasticity. The variance of the error term stays constant across observations. When volatility clusters, as it does in markets, the errors are heteroskedastic and standard errors can be misleading.
- No perfect multicollinearity. No explanatory variable is an exact linear combination of the others. High but imperfect correlation between predictors still inflates standard errors and makes individual coefficients unstable.
- Normally distributed errors. This mainly matters for hypothesis tests in small samples. Asset returns frequently show fat tails and skewness, so they depart from the bell curve this assumption describes.
The errors should also be unrelated to the explanatory variables. Leaving out a variable that affects Y and is correlated with an included X violates this condition and biases the coefficients. This problem is called omitted variable bias.
How Regression Is Used in Finance and Economics
- Beta and cost of capital. CAPM’s beta, estimated by regression, feeds into the expected return used to estimate a company’s cost of equity and discount cash flows.
- Factor models. Eugene Fama and Kenneth French added factors for company size and value (book-to-market) to the market model. The result is a multiple regression that explains stock returns better than market beta alone. Later versions added further factors.
- Hedge ratios. Regressing changes in a position’s value on changes in a hedging instrument gives the minimum-variance hedge ratio, the amount of the instrument needed per unit of exposure. This is a standard input to hedging with futures or correlated currency pairs.
- Pairs and statistical trading. Traders regress one asset’s price on another’s to estimate the spread and trade when it deviates from its historical relationship. This is a model-based bet, not riskless arbitrage.
- Econometrics and forecasting. Economists test hypotheses such as whether consumption rises with income. Companies model sales as a function of past sales, GDP growth, prices or weather.
- Chart tools. Many trading platforms offer a linear regression line or channel. This is a least-squares line fitted to recent prices against time, with bands at a set number of standard deviations. Time is the only explanatory variable, so the line describes the recent trend rather than explaining it.
Stepwise regression adds or removes candidate variables one at a time based on statistical criteria. It can help screen many factors, but it raises the risk of fitting noise.
Limitations of Regression
- Association, not causation. A strong, significant coefficient shows that variables move together in the sample. A third factor may drive both, or causation may run the other way.
- Spurious regression. Regressing one trending price series on another can produce a high R² and significant coefficients even when the series are unrelated. Analysts usually regress returns or changes instead of price levels, or test for cointegration.
- Unstable relationships. Coefficients estimated from past data can shift when market regimes change. A beta from a calm period may not hold in a crisis.
- Overfitting. A model with many variables can fit the history closely and still predict poorly out of sample.
- Outliers. Because OLS squares the errors, a few extreme observations can pull the line sharply.
- Extrapolation. Predictions outside the range of the data used to fit the model have little support.
Regression vs. Related Concepts
Regression vs. correlation. The correlation coefficient measures the strength and direction of a linear relationship on a scale from −1 to +1, and it treats both variables symmetrically. Regression assigns roles to the variables (X explains Y) and estimates how much Y changes per unit of X. In simple regression, R² equals the square of the correlation coefficient.
Regression vs. regression to the mean. Regression to the mean, or mean reversion, is the tendency for extreme observations to be followed by values closer to the average. Regression analysis is a method. Regression to the mean is a phenomenon that the method can help detect.
Why the name? In the 19th century, Sir Francis Galton found that children of very tall or very short parents tended to be closer to average height. He called this “regression toward mediocrity,” and the name stuck to his line-fitting technique. Least squares itself is older: Adrien-Marie Legendre published it in 1805, and Carl Friedrich Gauss also developed it.
FAQs
What is a good R-squared?
R-squared has no universal threshold. Regressions on asset returns often show modest R² values because returns are noisy, while models of price levels or smooth economic series can show very high values that are partly spurious. Judge R² alongside the residuals, out-of-sample performance and whether the relationship makes economic sense.
The Bottom Line
Regression matters to analysts, traders and economists who estimate beta, build factor models, set hedge ratios or forecast sales. Its coefficients show association in a sample, so a significant result does not prove causation. Reliable use means checking assumptions such as independent errors and constant variance, using enough data, regressing returns or changes rather than price levels, and expecting relationships to shift when market conditions change.















