# Regression Analysis

> Regression models how one variable relates to others. Learn linear regression, beta, R squared, multiple regression for factors, hedge ratios and common pitfalls.

Source: https://learn.tradelabsai.com/math/regression-analysis/  
Track: Math and Statistics · Level: Intermediate · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Regression Analysis", https://learn.tradelabsai.com/math/regression-analysis/

Regression analysis estimates how one variable, such as a stock's return, relates to one or more other variables, such as the market's return or a set of factors. It is one of the most widely used tools in finance: it produces betas, hedge ratios, factor exposures and alpha estimates, and it underpins many forecasting models. Understanding how regression works, and how it can mislead, is essential for quantitative trading and risk management.

## Simple linear regression

```
y = α + β × x + ε
```

| Term | Meaning |
|---|---|
| y | Dependent variable (for example, a stock's return) |
| x | Independent variable (for example, the market's return) |
| α (intercept) | Value of y when x is zero; in finance, often called alpha |
| β (slope) | Change in y for a one unit change in x |
| ε (error) | The part of y not explained by x |

Ordinary least squares (OLS) chooses α and β to minimise the sum of squared errors.

```
β = Cov(x, y) / Var(x)
```

## Worked example: market beta

**Example: Estimating a stock's beta**
Regressing a stock's monthly excess returns on the market's excess returns over five years gives:

y = 0.3% + 1.25 × x, with R² = 0.45.

- **Beta 1.25:** when the market rises 1%, the stock tends to rise about 1.25%.
- **Alpha 0.3% a month:** average return unexplained by the market; its standard error matters before concluding it is real.
- **R² 0.45:** the market explains about 45% of the stock's return variance; the rest is stock specific. See [Alpha and Beta](https://learn.tradelabsai.com/portfolio/alpha-and-beta/) and [R-Squared](https://learn.tradelabsai.com/portfolio/r-squared/).

## Multiple regression

With several explanatory variables:

```
y = α + β1 x1 + β2 x2 + ... + βk xk + ε
```

Factor models use multiple regression to measure exposure to market, size, value, momentum and other factors. A fund's "alpha" is often defined as the intercept after controlling for these factors. See [Factor Models](https://learn.tradelabsai.com/portfolio/factor-models/).

## Uses in trading

| Use | Example | Lesson |
|---|---|---|
| Beta and hedging | Hedge a stock with index futures | [Alpha and Beta](https://learn.tradelabsai.com/portfolio/alpha-and-beta/) |
| Hedge ratios for pairs | Regress one stock's price on another's | [Pairs Trading](https://learn.tradelabsai.com/strategies/pairs-trading/) |
| Factor exposures | Measure a portfolio's tilt to value or momentum | [Factor Models](https://learn.tradelabsai.com/portfolio/factor-models/) |
| Performance attribution | Separate skill from factor returns | [P&L and Performance Attribution](https://learn.tradelabsai.com/industry/performance-attribution/) |
| Forecasting | Predict returns from signals | [Signal Discovery](https://learn.tradelabsai.com/research/signal-discovery/) |
| Cost models | Estimate market impact from order size | [Market Impact](https://learn.tradelabsai.com/orders/market-impact/) |

## Assumptions and checks

| Assumption | Problem if violated | Remedy |
|---|---|---|
| Linear relationship | Biased estimates | Transform variables, add terms |
| Independent errors | Understated standard errors | Newey West standard errors. See [Autocorrelation and Partial Autocorrelation](https://learn.tradelabsai.com/math/autocorrelation/) |
| Constant error variance | Unreliable inference | Robust (heteroskedasticity consistent) standard errors |
| No strong multicollinearity | Unstable coefficients | Remove or combine correlated variables |
| Stationary data | Spurious results | Use returns, not prices; test for cointegration. See [Stationarity, Differencing and Unit Roots](https://learn.tradelabsai.com/math/stationarity/) |
| No extreme outliers | Distorted fit | Robust regression. See [Outliers and Robust Statistics](https://learn.tradelabsai.com/math/outliers-and-robust-statistics/) |

## Spurious regression

Regressing one trending price series on another can produce high R² and "significant" coefficients even when the series are unrelated. Clive Granger and Paul Newbold showed this in 1974. Use returns or test for cointegration when working with prices. See [Cointegration](https://learn.tradelabsai.com/math/cointegration/).

## Overfitting

Adding more variables always increases in sample R², even if they are noise. Use adjusted R², information criteria, regularisation (such as ridge and lasso regression) and out of sample tests to avoid overfitting. See [Overfitting and Curve Fitting](https://learn.tradelabsai.com/research/overfitting-and-curve-fitting/) and [Model Evaluation and Cross-Validation](https://learn.tradelabsai.com/machine-learning/cross-validation/).

## Frequently asked questions

### What is regression analysis in trading?

A statistical method that estimates how one variable, such as a stock's return, relates to others, such as market or factor returns.

### What does beta mean in a regression?

The slope coefficient: how much the dependent variable changes, on average, for a one unit change in the independent variable.

### What is a spurious regression?

A regression that shows a strong relationship between unrelated variables, often caused by regressing trending, non stationary series on each other.

Next, learn a general method for fitting models in [Maximum Likelihood](https://learn.tradelabsai.com/math/maximum-likelihood/).

## Continue learning

- Next lesson: [Maximum Likelihood](https://learn.tradelabsai.com/math/maximum-likelihood/)
- Previous lesson: [Statistical Significance in Trading](https://learn.tradelabsai.com/math/statistical-significance/)
- Related: [Statistical Significance in Trading](https://learn.tradelabsai.com/math/statistical-significance/): Statistical significance helps judge whether trading results reflect a real edge or luck. Learn the t statistic rule of thumb, sample size and multiple testing.
- Related: [Alpha and Beta](https://learn.tradelabsai.com/portfolio/alpha-and-beta/): Beta measures how much a portfolio moves with the market; alpha is the return beyond what that exposure explains. Learn formulas, CAPM, regression and pitfalls.
- Related: [Factor Models](https://learn.tradelabsai.com/portfolio/factor-models/): Factor models explain asset returns with common drivers such as the market, size, value and momentum. Learn CAPM, Fama French and how to run a factor regression.
- Related: [R-Squared](https://learn.tradelabsai.com/portfolio/r-squared/): R squared shows how much of a portfolio's movement is explained by its benchmark or a model. Learn what it means, how to read it with beta and alpha, and its traps.
- Related: [Pairs Trading](https://learn.tradelabsai.com/strategies/pairs-trading/): Pairs trading buys one asset and shorts a related one when their spread stretches, betting it will converge. Learn pair selection, hedge ratios, z scores and risks.
- Related: [Econometrics](https://learn.tradelabsai.com/math/econometrics/): Econometrics applies statistics to economic and financial data. Learn its core tools, common problems like endogeneity and spurious results, and how traders use it.
