σμ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
  • 日本語
  • 中文
scikit-learn skill›Module 3 · Honest evaluation›Topic 3.5·~50 minAdvanced

Information coefficient hit rate and calibration

Skill positionModule 3 of 4 · Topic 5 of 6
3.5 Information coefficient hit rate and calibration
—Lab score— / 100Total XP—Streak—

Scoring a model that ranks stocks

A return model for many stocks does not need to predict the size of each return. It needs to put the stocks in the right order. The information coefficient, IC, is the rank correlation between the predictions and the realised returns of one month, with ρ=1−6∑di2/(n(n2−1))\rho=1-6\sum d_i^{2}/(n(n^{2}-1))ρ=1−6∑di2​/(n(n2−1)) where did_idi​ is the difference between the two ranks of stock iii. It lies between −1-1−1 and 111, and values of 0.020.020.02 to 0.050.050.05 are typical for real signals. You compute one IC per month and look at the mean and at the t-statistic IC‾/(s/m)\overline{\mathrm{IC}}/(s/\sqrt{m})IC/(s/m​) over mmm months, which says whether the mean is distinguishable from zero.

ρ=1−6∑di2n(n2−1),t=IC‾s/m,IR≈IC⋅N⋅12,B=1n∑i(pi−yi)2\rho=1-\frac{6\sum d_i^{2}}{n(n^{2}-1)},\qquad t=\frac{\overline{\mathrm{IC}}}{s/\sqrt{m}},\qquad \mathrm{IR}\approx\mathrm{IC}\cdot\sqrt{N\cdot 12},\qquad B=\frac1n\sum_i(p_i-y_i)^{2}ρ=1−n(n2−1)6∑di2​​,t=s/m​IC​,IR≈IC⋅N⋅12​,B=n1​i∑​(pi​−yi​)2(1)

When the model outputs probabilities, such as the chance that a stock beats the median, two more scores matter. The hit rate is the share of right calls, which is easy to read and noisy. The Brier score is the mean of (pi−yi)2(p_i-y_i)^{2}(pi​−yi​)2, lower is better, and a constant guess of 0.50.50.5 scores 0.250.250.25. Calibration asks whether the probabilities mean what they say: among the cases where the model said 70%70\%70%, about 70%70\%70% should have happened. A sorted model can be poorly calibrated, and calibration decides how much to bet. The fundamental law links the two worlds: the annual information ratio is roughly the IC times the square root of the number of independent bets.

Five stocks and a real modelPredictions 0.1,0.4,0.2,0.9,0.50.1,0.4,0.2,0.9,0.50.1,0.4,0.2,0.9,0.5 against returns −1,2,0,3,1-1,2,0,3,1−1,2,0,3,1 have prediction ranks 1,3,2,5,41,3,2,5,41,3,2,5,4 and return ranks 1,4,2,5,31,4,2,5,31,4,2,5,3. The rank differences are 0,−1,0,0,10,-1,0,0,10,−1,0,0,1 so ∑d2=2\sum d^{2}=2∑d2=2 and ρ=1−6×2/(5×24)=0.9\rho=1-6\times2/(5\times24)=0.9ρ=1−6×2/(5×24)=0.9. For the probabilities 0.8,0.6,0.30.8,0.6,0.30.8,0.6,0.3 with outcomes 1,0,01,0,01,0,0, the Brier score is (0.04+0.36+0.09)/3=0.163(0.04+0.36+0.09)/3=0.163(0.04+0.36+0.09)/3=0.163, which beats 0.250.250.25 and gives a skill of 35%35\%35%. On the real monthly stock model (54 stocks, 257257257 test months) the mean IC is 0.03260.03260.0326 with a spread of about 0.210.210.21, so t=0.0326/(0.21/257)=2.49t=0.0326/(0.21/\sqrt{257})=2.49t=0.0326/(0.21/257​)=2.49, and the hit rate is only 50.7%50.7\%50.7%. The fundamental law, 0.0326×54×12=0.830.0326\times\sqrt{54\times12}=0.830.0326×54×12​=0.83, is an upper bound that ignores costs and the fact that the bets are not independent.
  • Rank, not size: the IC rewards putting stocks in the right order and ignores outliers' size.
  • Look at the t-statistic: a mean IC of 0.030.030.03 is only meaningful if it is several standard errors above zero.
  • Probabilities need calibration: Brier score and reliability tell whether 70%70\%70% means 70%70\%70%.

Lab · what's graded

  • Squared rank differences10 pts
  • The rank correlation15 pts
  • A t-statistic for the mean IC15 pts
  • A Brier score15 pts
  • The fundamental law10 pts
  • Hit rate against IC10 pts
  • Match the vocabulary10 pts
  • Why calibration matters15 pts
0/ 8 answered
Tasks
1Numeric answer10 ptsNot answered

The prediction ranks are 1,3,2,5,41,3,2,5,41,3,2,5,4 and the return ranks are 1,4,2,5,31,4,2,5,31,4,2,5,3. What is ∑di2\sum d_i^{2}∑di2​, the sum of squared rank differences?

s=s =s=accepted: ± 0.01
2Numeric answer15 ptsNot answered

With n=5n=5n=5 stocks and ∑di2=2\sum d_i^{2}=2∑di2​=2, what is ρ=1−6∑di2/(n(n2−1))\rho=1-6\sum d_i^{2}/(n(n^{2}-1))ρ=1−6∑di2​/(n(n2−1))? Give two decimals.

r=r =r=accepted: ± 0.01
3Numeric answer15 ptsNot answered

Over m=257m=257m=257 months the mean IC is 0.03260.03260.0326 and its standard deviation is 0.210.210.21. What is t=IC‾/(s/m)t=\overline{\mathrm{IC}}/(s/\sqrt{m})t=IC/(s/m​)? Use 257=16.03\sqrt{257}=16.03257​=16.03 and give two decimals.

t=t =t=accepted: ± 0.03
4Numeric answer15 ptsNot answered

The probabilities are 0.8,0.6,0.30.8,0.6,0.30.8,0.6,0.3 and the outcomes are 1,0,01,0,01,0,0. What is the Brier score 13∑(pi−yi)2\frac13\sum(p_i-y_i)^{2}31​∑(pi​−yi​)2? Give three decimals.

b=b =b=accepted: ± 0.002
5Numeric answer10 ptsNot answered

With a mean IC of 0.03260.03260.0326 and 545454 stocks traded 121212 times a year, the fundamental law gives IR≈IC54×12\mathrm{IR}\approx\mathrm{IC}\sqrt{54\times12}IR≈IC54×12​. What is it? Use 648=25.46\sqrt{648}=25.46648​=25.46 and give two decimals.

ir=ir =ir=accepted: ± 0.02
6Choice10 ptsNot answered

A model has a mean IC of 0.0330.0330.033 with t=2.5t=2.5t=2.5 but a hit rate of only 50.7%50.7\%50.7%. Which statement is right?

7Match10 ptsNot answered

Match each score with what it measures.

Pick the partner of each item on the left.

Information coefficient
Hit rate
Brier score
Calibration
8Explain in words15 ptsNot answered

A model ranks stocks well but says 90%90\%90% when the true chance is 55%55\%55%. In one or two sentences, explain why this still matters for trading.

Math modeKeyboard or LaTeX inputTask 1 of 8 · 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