Home / Glossary / What is R-squared in trading?

What is R-squared in trading?

R-squared is the share of the variation in one series that a fitted straight line through another series accounts for, between 0 and 1. An R-squared of 0.70 means 70 percent of the variation in the sample is accounted for by the line and 30 percent is not. It does not say the line will keep working.

Last updated 28 Nov 2026. Reviewed by the Custom Trading Platform education desk. Every figure on this page is sample arithmetic, shown in full.

The formula, written in full

  • R-squared equals 1 minus the residual sum of squares divided by the total sum of squares.
  • The total sum of squares is the sum of the squared gaps of each value from its average.
  • The residual sum of squares is the sum of the squared gaps between each value and the fitted line.
  • For one explanatory series it also equals the correlation squared.
  • A value near 1 means the points sit close to the line, and near 0 means they do not.

Worked example: four points, two methods

Take X as 2, 4, 6, 8 and Y as 1, 3, 2, 6. The covariance of X and Y is 4.67 and the variance of X is 6.67 (the same points are worked on the covariance page). The slope is 4.67 divided by 6.67, which is 0.7, and the line passes through the averages (5, 3).

XYFitted YGapGap squared
210.90.10.01
432.30.70.49
623.7-1.72.89
865.10.90.81
Total4.20

The total sum of squares of Y is 4 plus 0 plus 1 plus 9, which is 14. So R-squared is 1 minus 4.20 divided by 14, which is 0.70. The second method gives the same answer: the correlation is 0.84, and 0.84 squared is 0.70.

Why a high value can mislead

  • With few points it can be high by chance: two points always give exactly 1.
  • Trending series, such as prices, often show a high R-squared against each other only because both drifted.
  • Adding more explanatory series can only raise it, which is why an adjusted version exists.
  • It says nothing on whether the relationship will persist outside the sample.

Where traders meet it

It appears in reports on how much of a fund's movement follows its benchmark, and in the fit of a trend line. A beta of 1.2 with an R-squared of 0.2 says the slope is 1.2 but the line explains little of the movement, so the beta is a weak guide.

What it cannot tell you

R-squared does not say which series causes the other, whether the fit is useful, or whether the result would hold on new data. A test on new data is the only check, and none is claimed here.

Sources and method

Every figure on this page is sample arithmetic, shown in full, as of 28 Nov 2026. Each result was worked a second way before it was kept. No market data, price quote, broker term or return is stated as fact. How we check numbers is on the methodology page, and corrections go through contact.

How we will test it

We will recompute every figure in a second spreadsheet and repeat the worked example at a second set of inputs. No result is claimed. Last tested: not yet, results pending.

Questions people type

What does an R-squared of 0.7 mean? 70 percent of the variation in the sample is accounted for by the fitted line.

Is a higher R-squared better? It means a closer fit in the sample, not a better prediction.

How is R-squared related to correlation? For one explanatory series it is the correlation squared.

Can R-squared be negative? A line fitted with an intercept gives 0 to 1. Some other definitions can go below zero when a model fits worse than the average.

Related

Glossary, correlation calculator, covariance, beta, backtesting, Disclaimer.

Start free: create a free account to get the weekly note on tools and tests.

Education only. Nothing here is financial advice or a signal.