Back to Docs
T
Traderoid

DFA Node

Detrended Fluctuation Analysis

StatisticalAdvanced AnalysisPattern

Overview

DFA (Detrended Fluctuation Analysis) quantifies long-range correlations and trends in non-stationary time series data. It's especially useful for price data that has trends, unlike traditional autocorrelation that requires stationarity. DFA reveals self-similarity and scaling properties in market data.

A DFA exponent of 0.5 indicates white noise/random walk. Higher values (0.5-1.0) indicate persistent positive correlations (trending). Lower values (0.25-0.5) indicate mean reversion. DFA is more robust to non-stationary data than traditional statistical tests, making it ideal for financial time series.

Formula & Calculation

DFA Calculation Steps
1. Integrate time series (cumulative sum)
2. Split into segments
3. Detrend each segment (remove local fit)
4. Calculate fluctuation at each scale
5. DFA(n) ∝ n^α where α is DFA exponent
Result Interpretation
α = 0.5: Random walk (no correlation)
α = 1.0: Black noise (strong persistence, trending)
α = 1.5+: Highly trending (bubble/crash risk)
α < 0.5: Mean reverting (oscillating)

Parameters

ParameterDefaultDescription
lookback200-500Data window for DFA calculation
scale_range10-lookback/2Range of scales to analyze

Common Use Cases

1. Market Microstructure Analysis

Analyze how market structure changes across timeframes using scaling analysis of volatility.

2. Regime Detection

Monitor DFA changes to detect regime shifts between trending and mean-reverting markets.

3. Long-Range Correlations

Identify hidden long-term correlations that simple autocorrelation misses.

4. Volatility Prediction

Use scaling exponent changes to anticipate volatility regime changes.

Advantages & Limitations

Advantages

  • Works with non-stationary data
  • Reveals self-similarity patterns
  • Detects hidden long-range correlations
  • Robust to trends in data
!

Limitations

  • Complex interpretation
  • Computationally intensive
  • Requires significant data
  • Not widely known in trading community

Related Nodes