Back to López de Prado

Research review · López de Prado · study 02

Fractional Differentiation

Reproducing López de Prado's fixed-width fractional differencing on real crypto, equity and forex price series

Standard practice differences a price series to integer order one, it takes returns, to make it stationary. That works, but it erases the level: a return series is essentially uncorrelated with the price it came from, so the memory a model could use is gone. López de Prado's resolution is to difference to a real, fractional order d ∈ [0, 1], buying stationarity while preserving most of the memory. This note reproduces that idea on real data, first on BTC, then across a 505-pair crypto cross-section, then on equities and forex, and reports where it holds and where it does not. The explorer below lets you move d through the actual BTC sweep in the browser.

source

Advances in Financial ML, Ch. 5

López de Prado (2018) · fractional differentiation

Code & engines

github.com/DaruFinance/lopez-de-prado-work-review

the claim

What López de Prado says

  • Differencing a price series to integer order 1 (taking returns) makes it stationary but erases the level, the memory a predictive model could use is gone; leaving price un-differenced keeps the memory but is non-stationary and breaks most learning.
  • His resolution: difference to a real, fractional order d ∈ [0,1]. The operator (1−B)^d preserves most of the memory while reaching stationarity. The key quantity is the minimum d* at which an ADF test first rejects the unit root, he reports d* typically ~0.3–0.6 on equities/FX, with high correlation to the level at d*.

our result

What we found

  • The memory claim is overwhelming, not marginal: across 505 Binance perps, median d* is 0.15 with median correlation to the price level of 0.98 at d*, versus ~0.01 for plain returns (d=1), integer differencing destroys ~99% of the level memory that FFD preserves. This holds identically across crypto, equities and forex.
  • His ~0.3–0.6 d* figure does not reproduce here: at a matched 1-hour frequency crypto, equities (0.15) and forex (0.10) all sit near or below 0.15, with the highest single reading 0.25. We flag this honestly, part of the gap is ADF power and frequency, not asset class.
  • This is a feature-construction study; we have not yet tested whether models on FFD features out-of-sample-beat models on returns.

The result in three lines

~0.98 vs ~0.01

Returns destroy the memory

Fractional differencing at the just-stationary order keeps ~0.98 correlation with the price level; plain returns keep ~0.01. Integer differencing throws away ~99% of the level information for a stationarity you could have had far cheaper.

3 markets · 517 series

The memory result is universal

The same picture holds identically across 505 crypto perps, 9 equity ETFs and 3 forex pairs, all at 1h: ~0.98–1.00 memory kept at d*, ~0.01 at returns. This is the part of Ch. 5 that survives contact with real data.

d* ≈ 0.10–0.15

An honest non-confirmation

At 1h the minimum order is well below LdP's quoted 0.3–0.6 for equities/FX, and equities/FX are no higher than crypto here. The gap is explained by sampling frequency and series length, so we report it as a refutation of the level, not the memory.

Overview

Leaving a price un-differenced keeps all of its memory but leaves a unit root, which breaks most statistical learning. Integer differencing fixes the unit root but discards the level. Fractional differencing sits between the two: the operator (1 − B)^d expands into an infinite weighted sum of lagged values with binomial weights that decay but never quite reach zero. Fixed-Width Window FFD truncates that weight vector at a small threshold, producing a causal, backward-looking filter that can be stationary while preserving most of the memory. The quantity of interest is the minimum order d*, the smallest d at which an ADF test first rejects the unit root.

Move d yourself

The explorer below is driven by the study's real BTCUSDT 1h sweep. As you raise d from 0 (the raw level) toward 1 (plain returns), the ADF statistic plunges through its 95% critical line, and the correlation with the price level falls with it. The two curves are the whole story: stationarity is cheap, but past the just-stationary point you pay for it in memory you did not need to spend.

Demo: Fractional-differentiation explorer

Slide the differencing order d and watch stationarity bought against memory kept, on the study's real BTCUSDT 1h sweep. The series turns stationary at d* = 0.15 while still ~99% correlated with the price level.

btc_adf_vs_d.csv
d, differencing order0.15
0, level1, returns
stationary? (ADF vs 95% crit)
yes, passes
ADF statistic
-3.66
memory kept (corr w/ level)
98.7%
FFD window (bars)
3,901
STATIONARITY, ADF statistic95% crit ≈ -2.862-2-6-10-1400.250.50.751d
MEMORY, corr with price level99%10.750.50.25000.250.50.751d

At the sweet spot d* = 0.15 the series first passes ADF (just-stationary) while still 98.7% correlated with the price level, stationarity at almost no loss of memory.

Fig. 1:BTCUSDT 1h. The ADF statistic (falling) crosses the 95% critical line at d* = 0.15; the correlation with the log-price level (also shown) is still 0.987 there. A small fractional order is enough to stationarize while keeping nearly all the memory.

Reproduction, BTC

For BTCUSDT at 1h the ADF statistic crosses the 95% critical line at d* = 0.15, where the correlation with the log-price level is still 0.987. That is exactly the shape López de Prado draws: a small fractional order buys stationarity while almost all the memory survives.

Made concrete, the FFD(d*) series is visibly stationary, mean-reverting around a flat level, yet still tracks the regime structure of the price it came from.

Fig. 2:BTC log-price level versus its FFD(d*) transform. The differenced series is stationary (it oscillates around a flat mean) while preserving the broad regime shape of the level.
Fig. 3:Minimum order d* across 505 crypto perps at 1h. The distribution is tight and low, almost the entire cross-section stationarizes by d = 0.20.

At scale, 505 crypto pairs

Across the whole crypto cross-section the minimum order is strikingly low and tight: the median d* is 0.15 (Q1 0.10, Q3 0.15), the maximum observed is only 0.25, and 100% of pairs are stationary at some d < 1. The median memory at d* is 0.981, versus a median absolute correlation of just 0.010 at d = 1.

The memory-versus-stationarity frontier ties it together. By about d = 0.20 essentially every pair is ADF-stationary, while the median correlation with the level is still near 0.9 and only collapses toward zero as d → 1. Plain returns sit at the far-right end of that collapse, the single chart worth taking away.

Fig. 4:The memory frontier across the crypto cross-section. Stationarity is reached at small d (almost all pairs pass by d ≈ 0.20) while the median correlation with the level remains high, then collapses toward zero only as d → 1 (returns).

Crypto vs equities vs forex

López de Prado's worked examples land at d* ≈ 0.3–0.6, noticeably higher than the crypto median of 0.15. To test whether that is a market effect or an artifact of universe and frequency, the identical pipeline, same grid, same tau, same ADF spec, same memory metric, was run on 9 equity ETFs and 3 forex pairs at a matched 1h frequency.

marketnmedian d*IQR% d*<1mem @ d*|mem| @ d=1
crypto5050.1500.100–0.150100%0.9810.010
equities90.1500.000–0.150100%0.9970.007
forex30.1000.050–0.125100%0.9940.010
Fig. 5:d* by market, with LdP's 0.3–0.6 reference band shaded. All three markets sit below the band at 1h; equities match crypto and forex is lower.

At 1h neither equities nor forex shows a higher d* than crypto, equities match it at 0.15 and forex is lower at 0.10. Several instruments are already stationary at the raw log level: the volatility products VXX and UVXY, the energy ETF XLE, and the range-bound EUR/GBP cross. The highest single reading anywhere in the extension is QQQ at 0.25, still below LdP's lower bound. With this exact, shared methodology the 0.3–0.6 figure does not reproduce for these equity and forex series at 1h.

The memory story, by contrast, is universal. In every market FFD at d* retains ~0.98–1.00 correlation with the log-price level while plain returns retain ~0.01 in absolute value. The central claim, that fractional differencing buys stationarity for almost no loss of memory where integer differencing throws the memory away, holds identically across crypto, equities and forex.

Fig. 6:Memory kept at d* (~0.98–1.00) versus memory retained at d=1 (~0.01) across all three markets. The memory result is the part of the chapter that clearly survives contact with real data.

How to read the d* gap

The honest read is that d* is governed more by sampling frequency and series length than by asset class. ADF power grows with sample length, and the equity and forex series here are long (often 55k–88k bars), which biases their d* down; the comparison to LdP's examples also conflates market with bar size, since his examples are not all 1h. The crypto frequency study in the repository already shows d* shifting with frequency. So we do not claim equities have a permanently low d*, only that, at a matched 1h frequency, all three markets sit near 0.10–0.25, and that the durable cross-market finding is the memory result, not the level of d*.

Method

  • Causal throughout: the output at bar t uses only bars at or before t, on real OHLCV log-prices, no synthetic series and no lookahead.
  • Fixed-Width Window FFD with binomial weights w_k, truncated at the first |w_k| < tau (tau = 1e-5), giving a fixed-width, backward-looking filter. Verified that d=1 reproduces plain differences exactly and d=0 is the identity.
  • Stationarity by an ADF test (regression "c", maxlag=1) against the 95% critical value; d* is the smallest grid order whose ADF statistic falls below that critical value.
  • Memory measured as the Pearson correlation between the FFD series and the log-price level on the overlapping support, LdP's own diagnostic.
  • Run at scale: a 568-pair crypto cross-section (505 qualifying) streamed one series at a time over 32 cores, then the identical pipeline applied to 9 Algoseek equity ETFs and 3 forex pairs at a matched 1h frequency.

Reproducibility

The shared FFD library, the analysis scripts and the source of this write-up are collected in the companion repository, lopez-de-prado-work-review (study 02). There is no randomness anywhere in the pipeline: rerunning the two scripts reproduces every figure, table and number byte-stably. The explorer on this page encodes the published BTC sweep directly, so it reproduces exactly on every load.

Cite

See also

This is one entry in an ongoing review of López de Prado's methods on real data. The broader research index is at Research.

Fractional Differentiation | Daru Finance