σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Probability skill›Module 5 · Dependence and real tails›Topic 5.3·~1 hr 20 minAdvanced

Capstone: return distributions against real tails

Skill positionModule 5 of 5 · Topic 3 of 3
5.3 Capstone: return distributions against real tails
—Lab score— / 100Total XP—Streak—
Lecture0% read

2 min read

01

Testing a model against the data

This capstone turns the skill into a test. A model is a probability statement about returns, and the data can check it. If daily returns were normal, the loss exceeded on 1% of days would be the 99% value at risk -(μ+zσ) with z=Φ⁻¹(0.01)≈-2.326. Counting how many real days exceed that number, and comparing with 1% of all days, is a direct test of the normal model's tail.

g₁=m₃/(m₂^(3/2)), g₂=m₄/m₂²-3, mₖ=1/nΣᵢ(rᵢ-r̄)^k

Two numbers summarise the shape. Skewness is the third standardised moment and is zero for symmetric distributions. Kurtosis is the fourth standardised moment, 3 for a normal, so the excess kurtosis (kurtosis minus 3) is 0 for a normal and positive when the tails are heavier. A Student-t with ν degrees of freedom has excess kurtosis 6/(ν-4) for ν>4, which is why it can mimic the tails of returns. To simulate it with unit variance you divide the draws by √(ν/(ν-2)).

What the real data says

For AAPL from 2010 the daily mean is about 0.11% and the standard deviation 1.77%, so the 99% normal VaR is about 4.0%. A normal model predicts about 42 days below -4.0% in the 4,184 days; the data has 70, about 1.7 times as many. The excess kurtosis is about 6, where a normal has 0. The normal model is not wrong in the middle of the distribution, it is wrong in the tail, exactly where risk matters.

  • Moments: mean, standard deviation, skewness and excess kurtosis describe location, spread and shape.
  • Backtest a VaR: count exceedances and compare with (1-level)·n.
  • Student-t with unit variance is a drop-in fatter-tailed alternative to the normal.
A backtest is a probability question

Seventy exceedances against an expected 42 is not a coincidence: if the model were right, the count would be close to a binomial with mean 42 and standard deviation about 6.4, so 70 is more than four standard deviations high. Always ask how far a result is from what chance would produce, using the tools of this skill, before concluding that a model fails or works.

Lab · what's graded

5 tasks · 100 pts
  • Sample moments25 pts
  • A normal value at risk15 pts
  • Counting exceedances15 pts
  • Student-t draws20 pts
  • A tail report on real returns25 pts
Explorer · lab-pb-10
▾ lab-pb-10
▾ data
…
bash · in-browser
learner@quantcraft:~/lab-pb-10$
Python not loaded yetPythonLn 1, Col 1Spaces: 4UTF-8

Reset this topic?

Everything in lab-pb-10 goes back to the starter files and the terminal is cleared. Your current solution will be lost — this can't be undone.

Will be reset
  • main.py → starter code
  • Terminal history and test output
  • Unsubmitted changes
Will be kept
  • Best lab score
  • Your XP and streak
  • Lecture progress and notes