σμ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.2·~1 hrAdvanced

Joint distributions and copulas

Skill positionModule 5 of 5 · Topic 2 of 3
5.2 Joint distributions and copulas
—Lab score— / 100Total XP—Streak—

More than one variable at once

A joint distribution assigns probabilities to pairs (X,Y)(X,Y)(X,Y). Summing it over one variable gives the marginal distribution of the other. XXX and YYY are independent exactly when the joint probability is always the product of the marginals, P(X=x,Y=y)=P(X=x)P(Y=y)P(X=x,Y=y)=P(X=x)P(Y=y)P(X=x,Y=y)=P(X=x)P(Y=y). Otherwise they are dependent, and the covariance and correlation of the previous topics summarise the linear part of that dependence in one number.

F(x,y)=C(FX(x),FY(y)),C:[0,1]2→[0,1]F(x,y)=C\big(F_X(x),F_Y(y)\big),\qquad C:[0,1]^{2}\to[0,1]F(x,y)=C(FX​(x),FY​(y)),C:[0,1]2→[0,1](1)

Correlation is a poor summary when the dependence is not linear, or is strongest in the tails. A copula CCC separates the two ingredients of a joint distribution: the marginals FX,FYF_X,F_YFX​,FY​ say how each variable behaves alone, and the copula, a joint distribution of uniform variables, says how they move together (Sklar's theorem). The Gaussian copula has no tail dependence, however high the correlation: extreme moves in one variable do not make extreme moves in the other more likely in the limit. A Student-ttt copula does, which is why it is preferred for assets that crash together.

A joint tableLet XXX and YYY be 0/1 indicators of a loss in two stocks, with joint probabilities P(0,0)=0.5P(0,0)=0.5P(0,0)=0.5, P(0,1)=0.1P(0,1)=0.1P(0,1)=0.1, P(1,0)=0.1P(1,0)=0.1P(1,0)=0.1, P(1,1)=0.3P(1,1)=0.3P(1,1)=0.3. The marginals are P(X=1)=P(Y=1)=0.4P(X=1)=P(Y=1)=0.4P(X=1)=P(Y=1)=0.4. Independence would need P(1,1)=0.4⋅0.4=0.16P(1,1)=0.4\cdot0.4=0.16P(1,1)=0.4⋅0.4=0.16, but it is 0.30.30.3, so the stocks lose together more often than chance. Cov⁡=E[XY]−E[X]E[Y]=0.3−0.16=0.14\operatorname{Cov}=E[XY]-E[X]E[Y]=0.3-0.16=0.14Cov=E[XY]−E[X]E[Y]=0.3−0.16=0.14, and since Var⁡=0.4⋅0.6=0.24\operatorname{Var}=0.4\cdot0.6=0.24Var=0.4⋅0.6=0.24 for each, the correlation is 0.14/0.24≈0.5830.14/0.24\approx0.5830.14/0.24≈0.583.
  • Marginals come from summing the joint; independence means the joint is their product.
  • Copula: the dependence structure left after removing the marginals (Sklar).
  • Tail dependence: Gaussian copula has none; Student-ttt copula has it.
The copula behind the 2008 crisisBefore 2008 many credit-derivative prices used a Gaussian copula with a single correlation number, which implied that joint defaults in a crisis were far rarer than they turned out to be. A calibrated correlation cannot fix missing tail dependence. When you model dependence for risk, test how often your model produces several extreme losses together and compare with history.

Lab · what's graded

  • A marginal probability10 pts
  • The covariance15 pts
  • The correlation15 pts
  • Are they independent10 pts
  • Facts about copulas15 pts
  • A Gaussian copula simulation15 pts
  • Low correlation, joint crashes20 pts
0/ 7 answered
Tasks
1Numeric answer10 ptsNot answered

Let X and Y be 0/1 loss indicators of two stocks with P(0,0)=0.5, P(0,1)=0.1, P(1,0)=0.1 and P(1,1)=0.3. Find the marginal probability P(X=1).

P(X=1)=P(X=1) =P(X=1)=accepted: ± 0.001
2Numeric answer15 ptsNot answered

Let X and Y be 0/1 loss indicators of two stocks with P(0,0)=0.5, P(0,1)=0.1, P(1,0)=0.1 and P(1,1)=0.3. Compute Cov(X,Y) = E[XY] - E[X]E[Y].

Cov⁡=\operatorname{Cov} =Cov=accepted: ± 0.002
3Numeric answer15 ptsNot answered

Let X and Y be 0/1 loss indicators of two stocks with P(0,0)=0.5, P(0,1)=0.1, P(1,0)=0.1 and P(1,1)=0.3. Each of X and Y has variance 0.24. Find the correlation. Give it to three decimals.

ρ=\rho =ρ=accepted: ± 0.002
4Choice10 ptsNot answered

Let X and Y be 0/1 loss indicators of two stocks with P(0,0)=0.5, P(0,1)=0.1, P(1,0)=0.1 and P(1,1)=0.3. Are X and Y independent?

5Choice15 ptsNot answered

Select every true statement.

6Order the steps15 ptsNot answered

Put the steps of simulating correlated returns with a Gaussian copula in order.

Drag to reorder, or focus an item, press Space to lift it, the arrow keys to move it and Space to drop it.

  1. 1Apply the normal CDF to each correlated normal to get uniforms
  2. 2Draw independent standard normal numbers
  3. 3Apply each asset's inverse CDF to its uniform to get its return
  4. 4Correlate them by multiplying by the Cholesky factor of the correlation matrix
7Explain in words20 ptsNot answered

In two sentences, explain how two assets with low correlation can still crash together.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub