MathFin
Map / Statistics / MathFin.Choice.Performance.FracDiffWeights

Fractional-differentiation weight recursion

MathFin.Choice.Performance.FracDiffWeightsMSC 62M10MSC 60G22JEL C22 source

López de Prado (Advances in Financial Machine Learning, ch. 5) builds the fractionally-differenced series (1-B)^d X from a weight sequence computed by the recursion w_0 = 1, w_k = -w_{k-1}·(d-k+1)/k, the binomial-series coefficients of (1-B)^d for real exponent d.

This file states the recursion as fracDiffWeight and proves it agrees with the closed-form alternating product (-1)^k · ∏_{i<k} (d-i)/(i+1), by induction directly on the recursion, and with (-1)^k times Mathlib's generalized binomial coefficient Ring.choose d k. Through Mathlib's binomial series (Real.one_add_rpow_hasFPowerSeriesOnBall_zero) the weights are the coefficients of (1 - x)^d: ∑ₖ wₖ xᵏ = (1 - x)^d for |x| < 1 (a scalar x; the backshift operator B itself is not formalized). It also records the elementary per-step magnitude ratio relating consecutive weights. The ratio |d-k|/(k+1) tends to 1; that the weights nevertheless tend to 0 for d > -1 is not proved here, and no decay statement is.

The expanding-window differenced series fracDiff d X t = ∑_{k ≤ t} wₖ X_{t-k} is defined; for an integer d = n the weights are (-1)^k C(n, k) and vanish beyond n, so d = 1 gives the first difference X_{t+1} - X_t. Applied to X_t = μt + σB_t with B a pre-Brownian motion, observed on an equally spaced grid of [0, T], the drift estimator built from these first differences telescopes to the endpoint estimator of Probability/Laws/Estimation.lean, so its law is N(μ, σ²/T) for every number of observations (hasLaw_fracDiff_one_driftEstimator). Only the case d = 1 enters there.

Main definitions

  • fracDiffWeight: the fractional-differentiation weights w₀ = 1, w_{k+1} = −w_k (d − k)/(k+1).
  • fracDiff: the expanding-window fractionally differenced series ∑_{k ≤ t} wₖ X_{t−k}.

Main results

  • fracDiffWeight_eq_prod: fracDiffWeight d k = (-1)^k * ∏ i ∈ range k, (d-i)/(i+1).
  • fracDiffWeight_eq_choose: fracDiffWeight d k = (-1)^k * Ring.choose d k.
  • hasSum_fracDiffWeight_mul_pow: ∑ₖ fracDiffWeight d k * x^k = (1 - x)^d for |x| < 1.
  • abs_fracDiffWeight_succ: |fracDiffWeight d (k+1)| = |fracDiffWeight d k| * |d-k| / (k+1), the per-step magnitude ratio between consecutive weights.
  • fracDiffWeight_natCast, fracDiff_one_succ: integer orders; d = 1 is the first difference.
  • hasLaw_fracDiff_one_driftEstimator: the first-difference drift estimator of a Brownian motion with drift has law N(μ, σ²/T), whatever the sampling frequency.

References

  • Hosking, Fractional differencing [Hosking1981]
  • López de Prado, Advances in Financial Machine Learning [LopezDePrado2018], ch. 5; ch. 5, §5.4
  • R. C. Merton, On estimating the expected return on the market [Merton1980], §I

Tags

fractional differentiation, binomial series, López de Prado, stationarity, drift estimator, long memory, MSC 62M10, MSC 60G22, JEL C22

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-frac-diff-binomial-series · portfolio_and_performance.json · full statement
Fractional-Differencing Weights Are the Binomial Series of (1 − x)^d

The weights of the fractional-differencing recursion w₀ = 1, wₖ₊₁ = −wₖ(d − k)/(k + 1) satisfy ∑ₖ wₖ xᵏ = (1 − x)^d for every real d and |x| < 1; equivalently wₖ = (−1)ᵏ·C(d, k) with Mathlib's generalized binomial coefficient. The statement is for a scalar x; the backshift operator itself is not formalized.

mf-drift-estimator-differenced-law · portfolio_and_performance.json · full statement
First-Difference Drift Estimator of Brownian Motion with Drift Has Law N(μ, σ²/T)

Let X_t = μt + σB_t with B a pre-Brownian motion, observed at the n ≥ 1 equally spaced times kT/n of [0, T]. The drift estimator (1/T)∑ᵢ (Δ¹X)ᵢ₊₁, built from the d = 1 fractionally differenced observations, has law N(μ, σ²/T) for every n: it telescopes to (X_T − X_0)/T, so sampling more often does not reduce the standard error σ/√T. Only the case d = 1 (the first difference) of fractional differencing is involved.

Declarations 12

defMathFin.fracDiffWeightsource
ℝ → ℕ → ℝ

The fractional-differentiation weight recursion: w_0 = 1, w_{k+1} = -w_k · (d-k)/(k+1) (i.e. w_k = -w_{k-1}·(d-k+1)/k for k ≥ 1).

theoremMathFin.fracDiffWeight_zero @[simp]source
∀ (d : ℝ), fracDiffWeight d 0 = 1
theoremMathFin.fracDiffWeight_succsource
∀ (d : ℝ) (k : ℕ), fracDiffWeight d (k + 1) = -fracDiffWeight d k * (d - ↑k) / (↑k + 1)
theoremMathFin.fracDiffWeight_eq_prodsource
∀ (d : ℝ) (k : ℕ), fracDiffWeight d k = (-1) ^ k * ∏ i ∈ Finset.range k, (d - ↑i) / (↑i + 1)

Closed form: w_k is the alternating product (-1)^k · ∏_{i<k} (d-i)/(i+1), the real-exponent binomial coefficient (-1)^k · C(d,k).

theoremMathFin.abs_fracDiffWeight_succsource
∀ (d : ℝ) (k : ℕ), |fracDiffWeight d (k + 1)| = |fracDiffWeight d k| * |d - ↑k| / (↑k + 1)

Per-step magnitude ratio: |w_{k+1}| = |w_k| · |d-k| / (k+1).

theoremMathFin.succ_mul_ringChoose_succsource
∀ (d : ℝ) (k : ℕ), (↑k + 1) * Ring.choose d (k + 1) = Ring.choose d k * (d - ↑k)

(k + 1) · C(d, k + 1) = C(d, k) · (d - k): the ratio recursion of Mathlib's generalized binomial coefficient, the case n = k + 1 of Ring.choose_smul_choose.

theoremMathFin.fracDiffWeight_eq_choosesource
∀ (d : ℝ) (k : ℕ), fracDiffWeight d k = (-1) ^ k * Ring.choose d k

The weights are signed generalized binomial coefficients: fracDiffWeight d k = (-1)^k * Ring.choose d k, with Mathlib's Ring.choose.

theoremMathFin.hasSum_fracDiffWeight_mul_powsource
∀ (d : ℝ) {x : ℝ}, |x| < 1 → HasSum (fun k => fracDiffWeight d k * x ^ k) ((1 - x) ^ d)

The weights are the binomial series of (1 - x)^d: for |x| < 1, ∑ₖ fracDiffWeight d k * x^k = (1 - x)^d. From Mathlib's binomial series Real.one_add_rpow_hasFPowerSeriesOnBall_zero at -x and fracDiffWeight_eq_choose.

theoremMathFin.fracDiffWeight_natCastsource
∀ (n k : ℕ), fracDiffWeight (↑n) k = (-1) ^ k * ↑(n.choose k)

Integer orders: for d = n ∈ ℕ the weights are (-1)^k C(n, k), so they vanish for k > n and (1 - B)^n is a finite difference.

defMathFin.fracDiffsource
ℝ → (ℕ → ℝ) → ℕ → ℝ

The expanding-window fractionally differenced series (López de Prado, ch. 5): fracDiff d X t = ∑_{k ≤ t} wₖ X_{t-k}, the binomial series of (1 - B)^d applied to X and truncated at the start of the sample.

theoremMathFin.fracDiff_one_succsource
∀ (X : ℕ → ℝ) (t : ℕ), fracDiff 1 X (t + 1) = X (t + 1) - X t

d = 1 is the first difference: fracDiff 1 X (t + 1) = X (t + 1) - X t, since w₀ = 1, w₁ = -1 and wₖ = 0 for k ≥ 2 (fracDiffWeight_natCast).

theoremMathFin.hasLaw_fracDiff_one_driftEstimatorsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {B : NNReal → Ω → ℝ}, IsPreBrownianReal B P → ∀ (mu sigma : ℝ) {T : NNReal}, 0 < T → ∀ {n : ℕ}, 0 < n → HasLaw (fun ω => (∑ i ∈ Finset.range n, fracDiff 1 (fun k => mu * ↑(↑k * T / ↑n) + sigma * B (↑k * T / ↑n) ω) (i + 1)) / ↑T) (gaussianReal mu (sigma ^ 2 / ↑T).toNNReal) P

The first-difference drift estimator sees only the endpoints. Let X_t = μt + σB_t with B a pre-Brownian motion, observed at the n ≥ 1 equally spaced times tₖ = kT/n of [0, T]. The drift estimator (1/T) ∑_{i<n} (fracDiff 1 X)_{i+1}, the sum of the first-differenced observations, telescopes to the endpoint estimator (X_T - X_0)/T, so it has law N(μ, σ²/T) for every n (drift_se_endpoint_hasLaw, with the Brownian increment B_T - B_0 ∼ N(0, T)): sampling more often does not shrink the standard error σ/√T.