Skip to content

First difference

A first difference is the change between consecutive observations. See why price changes differ from returns, how levels can be reconstructed, and when differencing helps stationarity.

A first difference is the change between consecutive observations of a time series:
Δyt=yt−yt−1.\Delta y_t=y_t-y_{t-1}.
For an asset price, this measures the move in price units. It can be a useful input to a model of short-run changes, but it is not automatically a percentage return or a stationary series. The transformation changes the question from “What is the level?” to “How much did it move since the previous observation?”

Four prices, three changes

Suppose an asset has these synthetic closing prices at equally spaced trading-session observations. Prices are USD per share; no dividends, fees or corporate actions occur in this example.

ObservationPriceFirst difference
t=0t=0100Not available
t=1t=1103103−100=+3103-100=+3
t=2t=2101101−103=−2101-103=-2
t=3t=3106106−101=+5106-101=+5
The initial observation has no earlier price in this sample, so its difference is missing, not zero. With nn consecutive observed levels, there are n−1n-1 adjacent differences. Each difference belongs to the interval ending at its timestamp.
Synthetic prices 100, 103, 101, 106 USD per share at equally spaced times yield changes plus 3, minus 2, plus 5 USD per share. The middle change is minus 2 USD per share, versus a simple price return of approximately minus 1.9417 percent.
Synthetic prices 100, 103, 101, 106 USD per share at equally spaced times yield changes plus 3, minus 2, plus 5 USD per share. The middle change is minus 2 USD per share, versus a simple price return of approximately minus 1.9417 percent.
Original synthetic observations. Differences retain USD-per-share units and are aligned to the ending observation. Lines between prices guide the eye; there is no observed difference at the starting point.

Price change, simple return and log return

The move from 103 to 101 illustrates three related calculations:

ObjectCalculationUnits
Price first differenceΔPt=101−103=−2\Delta P_t=101-103=-2USD per share
Simple price returnΔPt/Pt−1=−2/103≈−1.9417%\Delta P_t/P_{t-1}=-2/103\approx-1.9417\%Dimensionless
First difference of log-priceΔlog⁡Pt=log⁡(101/103)\Delta\log P_t=\log(101/103)Dimensionless
The last row is a log return because the input series is log-price. Taking a first difference does not itself apply a logarithm or divide by the earlier price. Simple price return requires a nonzero earlier price; the real-valued log expression requires positive prices. With cash distributions, a price-only calculation also differs from total return.

Differencing can help stationarity; it does not establish it

Under a random-walk model with drift,
yt=yt−1+μ+εt,Δyt=μ+εt.y_t=y_{t-1}+\mu+\varepsilon_t, \qquad \Delta y_t=\mu+\varepsilon_t.
If the innovations are white noise with constant finite variance, these differences are covariance-stationary. That conclusion comes from the model assumptions, not from the subtraction alone. A process needing two differences can remain nonstationary after the first. Even a deterministic sequence yt=t2y_t=t^2 gives Δyt=2t−1\Delta y_t=2t-1, which still trends with time.
Conversely, unnecessary differencing can introduce dependence. If yt=α+βt+uty_t=\alpha+\beta t+u_t with stationary utu_t, both removing the justified deterministic trend and taking differences can produce stationary series, but they produce different objects:
detrended level=ut,Δyt=β+ut−ut−1.\text{detrended level}=u_t, \qquad \Delta y_t=\beta+u_t-u_{t-1}.
When utu_t is white noise with positive variance, the differenced noise has lag-one correlation −1/2-1/2. The negative dependence was introduced by the transformation. Detrending preserves deviations around the fitted or stipulated trend; differencing measures changes between dates. Choose the object the application needs, then investigate its stationarity.
For the random-walk equation and the practical choices behind unit-root testing, see Stationarity and Unit Roots (public preview; full lesson requires membership).

Keep the starting value and the clock

Differences alone lose the absolute starting level: adding the same constant to every level leaves all differences unchanged. Retaining the starting value restores the path by accumulation:

yt=y0+∑s=1tΔys.y_t=y_0+\sum_{s=1}^{t}\Delta y_s.

Here, 100+3−2+5=106100+3-2+5=106. Modelling changes therefore need not prevent reconstructing a level forecast, provided its starting level is retained.

The clock still matters. Adjacent records need not cover equal time spans if observations are missing. An overnight change and a multi-session change are not interchangeable merely because each occupies one row. Differencing is also distinct from a rate of change per unit time: it does not divide by elapsed time. The change ending at tt becomes available only when yty_t is observed; a backtest cannot use it to justify an earlier decision.

Sources

  • Chris Brooks, Introductory Econometrics for Finance, second edition, Cambridge University Press, 2008, §7.1.2, pp. 322–323, and §7.1.3, pp. 326–327: differencing, deterministic trends and integration order.
  • Rob J. Hyndman and George Athanasopoulos, Forecasting: Principles and Practice, third edition, §§9.1–9.2: adjacent differences, the missing initial value, random walks, over-differencing and backshift notation.
Last updated
  • time series
  • differencing
  • price changes
  • stationarity
← Back to the glossaryBack to top ↑