Quant Memo
Advanced

Fractional Differentiation

A way to make a price series stationary while keeping most of its memory, by differencing it a fractional amount instead of the usual whole step that returns represent.

Prerequisites: Stationarity, Unit Roots and the ADF Test

Modeling prices runs into a dilemma. Raw price levels are non-stationary, they trend and wander, so most statistical and machine-learning models choke on them (see Stationarity and Unit Roots and the ADF Test). The usual fix is to take returns, that is, to difference the series once. But a full difference is a sledgehammer: it makes the series stationary and erases almost all of its memory. Today's return tells you nothing about whether the price is high or low, near a support level, or far from its recent range. You threw away the very "level" information a predictor might want.

Fractional differentiation is the scalpel. Instead of differencing a whole step (order 11, which gives returns) or not at all (order 00, the raw level), you difference by a fractional order dd between 00 and 11, just enough to pass a stationarity test while keeping as much memory as possible.

The fractional difference operator

Differencing is the operator (1B)(1 - B), where BB is the backshift (lag) operator: BXt=Xt1B X_t = X_{t-1}. A first difference is (1B)Xt=XtXt1(1-B)X_t = X_t - X_{t-1}. Raising it to a real power dd and expanding the binomial series gives an infinite weighted sum of past values:

(1B)dXt=k=0wkXtk,wk=wk1dk+1k,  w0=1.(1 - B)^d X_t = \sum_{k=0}^{\infty} w_k\, X_{t-k}, \qquad w_k = -\,w_{k-1}\,\frac{d - k + 1}{k},\ \ w_0 = 1.

In words: the fractionally-differenced value at time tt is a weighted sum of the current and all past prices, with weights wkw_k that you build by a simple recursion starting from w0=1w_0 = 1. The key is how fast those weights decay. For d=1d = 1 they collapse to {1,1,0,0,}\{1, -1, 0, 0, \dots\}, ordinary returns, no memory beyond one lag. For d=0d = 0 they are {1,0,0,}\{1, 0, 0, \dots\}, the untouched level. For a fraction like d=0.5d = 0.5, the weights decay slowly, so the series keeps a long, fading memory of the past.

Lag kkd=0d = 0 (level)d=0.5d = 0.5d=1d = 1 (return)
0111
10−0.500−1
20−0.1250
30−0.0630
40−0.0390
50−0.0270

Weights on past prices for three differencing orders. Returns (d=1d=1) keep only lag 0 and 1, wiping out all longer memory. The fractional order d=0.5d=0.5 keeps a slowly-decaying tail, so the transformed series still remembers where the price has been.

Full differencing (returns) makes a price series stationary but throws away its memory. Fractional differencing removes only enough trend to pass a stationarity test while retaining a long, decaying memory of past levels, the best of both worlds for a feature.

The stationarity-vs-memory trade-off

As you raise dd from 00 toward 11, two things move in opposite directions. Stationarity improves, the ADF test statistic gets more negative and eventually rejects the unit root. Memory fades, the correlation between the transformed series and the original price level drops toward zero. The sweet spot is the smallest dd that passes the stationarity test: you buy just enough stationarity and pay the minimum possible in lost memory.

Worked example

You have a log-price series that fails the ADF test badly (it has a unit root). Two extremes:

  • Returns (d=1d = 1). The ADF test strongly rejects the unit root, fully stationary, but the correlation between returns and the price level is essentially 00. Every trace of "how high is the price" is gone.
  • Level (d=0d = 0). Correlation with the original is 1.01.0 (it is the original), but it's hopelessly non-stationary.

Now sweep dd upward and re-run ADF at each step. Suppose the series first passes the ADF test at the 5%5\% level around d0.4d \approx 0.4. At that dd, the transformed series still has a correlation of roughly 0.990.99 with the original price level, it is now stationary yet has kept almost all of its memory. Compare that to returns, which are stationary but retain none. Feed the d=0.4d = 0.4 series to your model and it gets both a well-behaved input and the level information; feed it returns and it only gets the latter erased. That preserved memory is often exactly what carries the predictive signal.

Don't guess dd. Sweep it from 00 upward in small steps, run the ADF test at each, and pick the smallest dd that just clears your significance threshold. Going higher only sacrifices memory you didn't need to sacrifice.

Pitfalls

  • Truncating the weights too early. The weight tail decays slowly, so a short window drops real memory. Use a small weight-threshold cutoff, not an arbitrary fixed window.
  • Look-ahead through the window. The weighted sum uses past values only, but make sure your implementation never reaches forward, and fit any scaler after differencing, inside each CV fold.
  • Over-differencing. Picking a large dd "to be safe" needlessly destroys memory, the opposite of the goal. Smallest passing dd wins.
  • Assuming it creates signal. Fractional differencing is a preprocessing step that preserves information; it doesn't manufacture predictability where none exists.

Returns are the default in finance precisely because they're stationary, but that convenience is a hidden cost: they discard the price level, which often carries the signal. Reflexively differencing to order 11 can be quietly throwing away the most useful part of your data.

In interviews

If asked "how do you make a price series stationary without losing its memory?", name fractional differentiation: difference by a real order dd between 00 and 11, chosen as the smallest value that passes the ADF test, so the weights on past prices decay slowly and retain memory. Contrast it with returns (d=1d=1, stationary but memoryless) and levels (d=0d=0, full memory but non-stationary), and mention that it's a feature-engineering step feeding the model's inputs, not a source of alpha by itself.

Related concepts

Practice in interviews

Further reading

  • López de Prado, Advances in Financial Machine Learning (Ch. 5)
  • Hosking, Fractional Differencing
ShareTwitterLinkedIn