MathFin
Map / Statistics / MathFin.Probability.Laws.Estimation

Estimation: Gaussian variance-ratio divergence and realised-volatility bias

MathFin.Probability.Laws.EstimationMSC 62F10MSC 62P05JEL C58 source

Detection. Between two centred Gaussian regimes with variance ratio r = σ²_high/σ²_low, the per-observation discrimination information is the Kullback–Leibler divergence D = ½(r − 1 − ln r) (kl_gaussianReal_var_ratio), stated as the integral of the log-likelihood ratio MeasureTheory.llr against the high-variance law. The proof writes both laws in withDensity form (gaussianReal_of_var_ne_zero) and identifies the Radon–Nikodym derivative with the pdf ratio (MeasureTheory.Measure.rnDeriv_withDensity_right). D is the denominator of Wald's sequential-test delay ≈ ln(1/α)/D; near r = 1 it is (r − 1)²/4 up to a cubic remainder (abs_klVarRatio_sub_sq_le).

Realised volatility. Observing n increments of second moment σ²Δt through mean-zero noise of variance η² (each increment independent of its two noise draws, and adjacent noise draws independent of each other) makes the expected realised variance σ²T + 2nη²: a bias linear in the sampling frequency (integral_sum_sq_noisy_increments; Zhang, Mykland and Aït-Sahalia). The square-root estimator of a nondegenerate variance target is biased low, E[σ̂] < σ (sqrtBias_oneSided, with the one-sample Gaussian instance sqrtBias_absGaussianSample). For one Gaussian sample the bias is exact: E|Z| = √(2v/π) for Z ∼ N(0, v) (integral_abs_gaussianReal), read off the truncated first moment of the standard normal in Probability/Gaussian/GaussianPartialMoments.lean. The endpoint drift estimator (X_T − X_0)/T of X_t = μt + σB_t has law N(μ, σ²/T), so its standard error σ/√T does not depend on the sampling frequency (drift_se_endpoint_hasLaw, drift_se_endpoint_var).

Scope

Not proved here: the sequential-test delay ln(1/α)/D itself (only D is formalised); the identification of the stated ∫ llr with Mathlib's InformationTheory.klDiv (it needs absolute continuity and integrability of llr, InformationTheory.toReal_klDiv); the exact constant √(2/n)·Γ((n+1)/2)/Γ(n/2) of the square-root bias for n ≥ 2 (the n = 1 value is integral_abs_gaussianReal); and noise-robust estimators such as two-scale realised variance. The drift statements here take a single B_T ∼ N(0, T) and the endpoint estimator (μT + σB_T)/T as given, so n does not appear in them; that the n-sample estimator of a pre-Brownian motion with drift, on an equally spaced grid, reduces to this endpoint form is hasLaw_fracDiff_one_driftEstimator in Choice/Performance/FracDiffWeights.lean.

Main results

  • kl_gaussianReal_var_ratio: the integral of the log-likelihood ratio llr of N(0, r·v) against N(0, v), taken under N(0, r·v), is (r − 1 − ln r) / 2, for v ≠ 0 and r ≠ 0.
  • abs_klVarRatio_sub_sq_le: for |r − 1| ≤ 1/2, (r − 1 − ln r)/2 differs from (r − 1)²/4 by at most |r − 1|³.
  • integral_sum_sq_noisy_increments: with increments of second moment σ²·Δt observed through mean-zero noise of second moment η² (independence hypotheses as stated), the noisy realised sum of squares has expectation σ²T + 2nη², where T = n·Δt.
  • sqrtBias_oneSided: for a nonnegative, integrable, nondegenerate Y with E[Y] = σ² and σ > 0, E[√Y] < σ.
  • sqrtBias_absGaussianSample, integral_abs_gaussianReal: for Z ∼ N(0, v) with v ≠ 0, E|Z| < √v; and E|Z| = √(2v/π).
  • drift_se_endpoint_hasLaw, drift_se_endpoint_var: for X_t = μt + σB_t with B_T ∼ N(0, T), the endpoint estimator (X_T − X_0)/T has law N(μ, σ²/T) and variance σ²/T.

References

Tags

Kullback–Leibler divergence, realised volatility, microstructure noise, variance ratio, estimator bias, MSC 62F10, MSC 62P05, JEL C58

Import neighbourhood

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

Corpus entries

mf-gaussian-mean-abs-deviation · portfolio_and_performance.json · full statement
Mean Absolute Value of a Centred Gaussian: E|Z| = √(2v/π)

For Z ∼ N(0, v), E|Z| = √(2v/π). So the one-sample volatility estimator |Z| underestimates σ = √v by the exact factor √(2/π) ≈ 0.798. The n-sample constant √(2/n)·Γ((n+1)/2)/Γ(n/2) for n ≥ 2 is not covered.

Declarations 9

theoremMathFin.log_ratio_gaussianPDFReal_eqsource
∀ {r v : NNReal}, v ≠ 0 → r ≠ 0 → ∀ (x : ℝ), Real.log (gaussianPDFReal 0 (r * v) x / gaussianPDFReal 0 v x) = -Real.log ↑r / 2 + x ^ 2 * (↑r - 1) / (2 * ↑r * ↑v)

Pointwise identity: the log of the pdf ratio between N(0, r·v) and N(0, v) is the quadratic −½·ln r + x²(r−1)/(2rv) (completing-the-square algebra, the one-observation form of the D-term).

theoremMathFin.kl_gaussianReal_var_ratiosource
∀ {r v : NNReal}, v ≠ 0 → r ≠ 0 → ∫ (x : ℝ), llr (gaussianReal 0 (r * v)) (gaussianReal 0 v) x ∂gaussianReal 0 (r * v) = (↑r - 1 - Real.log ↑r) / 2

The D-term. KL(N(0, r·v) ‖ N(0, v)) — the integral of the log likelihood ratio llr against N(0, r·v) (the high-variance law when r > 1) — is ½(r − 1 − ln r), the denominator of Wald's sequential-test delay ≈ ln(1/α)/D observations (the delay itself is not proved here). The proof writes both laws in withDensity form, computes the RN derivative as the pdf ratio via Measure.rnDeriv_withDensity_right and Measure.rnDeriv_withDensity, and integrates the resulting quadratic termwise with the second moment MathFin.integral_sq_gaussianReal.

theoremMathFin.abs_klVarRatio_sub_sq_lesource
∀ {r : ℝ}, |r - 1| ≤ 1 / 2 → |(r - 1 - Real.log r) / 2 - (r - 1) ^ 2 / 4| ≤ |r - 1| ^ 3

The small-shift quadratic (to leading order, halving the gap between the regimes quarters the information). Near r = 1 the value D(r) = (r − 1 − ln r)/2 of kl_gaussianReal_var_ratio is (r−1)²/4 up to a cubic remainder: |D(r) − (r−1)²/4| ≤ |r−1|³ whenever |r − 1| ≤ ½. The statement is about this real function; it does not mention the Gaussian laws. So the discrimination information vanishes quadratically as the two regimes coalesce, and a delay ≈ ln(1/α)/D would grow like 1/(r−1)². From the second-order log-series bound Real.abs_log_sub_add_sum_range_le at x = 1 − r.

theoremMathFin.integral_sum_sq_noisy_incrementssource
∀ {α : Type u_1} [MeasurableSpace α] {μ : Measure α} {n : ℕ} {dt T sigma eta : ℝ}, T = ↑n * dt → ∀ (dX e : ℕ → α → ℝ), (∀ i ∈ Finset.range n, Integrable (dX i) μ) → (∀ j ∈ Finset.range (n + 1), Integrable (e j) μ) → (∀ i ∈ Finset.range n, Integrable (fun x => dX i x * dX i x) μ) → (∀ j ∈ Finset.range (n + 1), Integrable (fun x => e j x * e j x) μ) → (∀ i ∈ Finset.range n, ∫ (x : α), dX i x * dX i x ∂μ = sigma * sigma * dt) → (∀ j ∈ Finset.range (n + 1), ∫ (x : α), e j x * e j x ∂μ = eta * eta) → (∀ j ∈ Finset.range (n + 1), ∫ (x : α), e j x ∂μ = 0) → (∀ i ∈ Finset.range n, IndepFun (e i) (e (i + 1)) μ) → (∀ i ∈ Finset.range n, IndepFun (dX i) (e i) μ ∧ IndepFun (dX i) (e (i + 1)) μ) → ∫ (x : α), ∑ i ∈ Finset.range n, (dX i x + (e (i + 1) x - e i x)) ^ 2 ∂μ = sigma * sigma * T + 2 * ↑n * eta * eta

The realised-variance noise bias is linear in sampling frequency (Zhang, Mykland and Aït-Sahalia 2005). Over n increments ΔX_i with second moment E[(ΔX_i)²] = σ²·Δt (the MathFin.integral_sq_gaussianReal moment in the Gaussian instance) observed through mean-zero noise ε_j of scale η (E[ε_j] = 0, E[ε_j²] = η²), so that the observed price is Y = X + ε and the observed increment is ΔY_i = ΔX_i + (ε_{i+1} − ε_i), the noisy realised sum has expectation σ²T + 2nη² where T = n·Δt: each increment contributes its signal second moment plus two noise second moments, and all cross-terms vanish by independence + mean-zero (IndepFun.integral_mul_eq_mul_integral). Only the independences the cross-terms use are assumed — each increment against its two noise draws, and adjacent noise draws pairwise — so iid noise independent of the signal is a special case. No probability hypothesis on μ is needed; the integrability hypotheses are kept explicit.

theoremMathFin.sqrtBias_oneSidedsource
∀ {α : Type u_1} [MeasurableSpace α] {μ : Measure α} [IsProbabilityMeasure μ] {Y : α → ℝ}, (∀ (ω : α), 0 ≤ Y ω) → ∀ {sigma : ℝ}, 0 < sigma → Integrable Y μ → ∫ (ω : α), Y ω ∂μ = sigma * sigma → μ {ω | Y ω ≠ sigma * sigma} ≠ 0 → ∫ (ω : α), √(Y ω) ∂μ < sigma

The sign of the square-root bias: E[σ̂] < σ. If Y ≥ 0 is a nondegenerate target with E[Y] = σ² (the sample reading: Y = RV/T, the noise-free annualised realised variance whose square root is the volatility estimator σ̂ = √Y), then E[√Y] < σ — the square-root estimator of a nondegenerate volatility is biased low. Strictness comes from the tangent-line identity at σ²: √y = (y + σ²)/(2σ) − (√y − σ)²/(2σ), whose remainder is strictly positive on {Y ≠ σ²}, a set of positive measure by nondegeneracy. The exact Gaussian constant √(2/n)·Γ((n+1)/2)/Γ(n/2) of the bias is not formalized here for n ≥ 2; for n = 1 it is integral_abs_gaussianReal.

theoremMathFin.sqrtBias_absGaussianSamplesource
∀ {v : NNReal}, v ≠ 0 → ∫ (x : ℝ), |x| ∂gaussianReal 0 v < √↑v

The Gaussian sample instance: E[|Z|] < σ for Z ~ N(0, σ²). The single-sample (n = 1) realised-volatility estimator is σ̂ = |Z| = √(Z²), whose target Y = Z² is nondegenerate (P(Z² = σ²) = 0 — a nondegenerate Gaussian has no atoms, NullSingletonClass) — so sqrtBias_oneSided applies. The exact value E|Z| = σ√(2/π) ≈ 0.798σ is integral_abs_gaussianReal.

theoremMathFin.integral_abs_gaussianRealsource
∀ (v : NNReal), ∫ (x : ℝ), |x| ∂gaussianReal 0 v = √(2 * ↑v / Real.pi)

Mean absolute value of a centred Gaussian: E|Z| = √(2v/π) for Z ∼ N(0, v). The one-sample volatility estimator |Z| therefore underestimates σ = √v by the exact factor √(2/π) ≈ 0.798 (compare sqrtBias_absGaussianSample). For v = 1, |x|ϕ(x) is the even function y ↦ yϕ(y) of |x|, so E|Z| = 2∫₀^∞ zϕ(z) dz = 2ϕ(0) by the truncated first moment integral_id_mul_gaussianPDFReal_Ioi; a general v is the image of N(0, 1) under x ↦ √v·x (gaussianReal_map_const_mul).

theoremMathFin.drift_se_endpoint_hasLawsource
∀ {Ω : Type u_1} [MeasurableSpace Ω] {P : Measure Ω} {T : ℝ}, 0 < T → ∀ (mu sigma : ℝ) {B : Ω → ℝ}, HasLaw B (gaussianReal 0 T.toNNReal) P → HasLaw (fun ω => (mu * T + sigma * B ω) / T) (gaussianReal mu (sigma ^ 2 / T).toNNReal) P

The endpoint drift estimator (its law). For X_t = μt + σB_t with B_T ~ N(0, T), the endpoint drift estimator (X_T − X_0)/T = μ + (σ/T)·B_T has law N(μ, σ²/T) — an affine pushforward of the gaussianReal sample (gaussianReal_const_mul then gaussianReal_const_add). The variance slot is σ²/T, so the drift standard error σ/√T does not depend on the number n of sampling points (n does not appear in the statement, which takes the endpoint form as given).

theoremMathFin.drift_se_endpoint_varsource
∀ {Ω : Type u_1} [MeasurableSpace Ω] {P : Measure Ω} {T : ℝ}, 0 < T → ∀ (mu sigma : ℝ) {B : Ω → ℝ}, HasLaw B (gaussianReal 0 T.toNNReal) P → variance (fun ω => (mu * T + sigma * B ω) / T) P = sigma ^ 2 / T

The endpoint drift estimator (its variance). Var[(X_T − X_0)/T] = σ²/T: the drift estimator's standard error is σ/√T, independent of the sampling frequency n, because the estimator is a function of the endpoints only. Via HasLaw.variance_eq and variance_id_gaussianReal.