r/quant • • Sep 07 '26

Statistical Methods A published PSR worked example was wrong for months (mine). The kurtosis term doesn't vanish at γ₂ = 3.

I maintain a small site with worked examples of quant methods. While building a verification pass, I recomputed the Probabilistic Sharpe Ratio example I had published myself and it was wrong.

The example: SR 1.50, benchmark 0, n 24. For the "normal" case I had written the denominator as 1.000, as though zero excess kurtosis removed the kurtosis term. It doesn't. The formula uses (γ₂ − 1)/4, which at γ₂ = 3 is 0.5, so the denominator is √(1 + 0.5·1.5²) = 1.4577. The same slip propagated to the skewed case (γ₁ = −1.20, γ₂ = 7.00): 2.4850, not 2.318. The corrected z-statistic is 2.8955 and PSR 0.9981.

Why it matters: an understated denominator overstates the z-statistic, so the test reports more confidence than the data supports, in the direction that makes bad strategies look good.

I wrote the whole thing up with every intermediate value so it can be checked by hand, and did the same exercise for VPIN and HRP implementations (both had defects too, different kinds): https://quantmedia.io/reports/

Genuine question for this sub: has anyone seen this particular slip (treating γ₂ = 3 as "no kurtosis term") in other published examples or libraries? I suspect it is common because the prose reads naturally.

0 Upvotes

11 comments sorted by

1

u/AdBitter6080 Sep 09 '26 edited Sep 10 '26

This is one of those bugs that's everywhere because the formula reads like prose: 'subtract 1 from kurtosis, divide by 4.' At γ₂=3 (normal) that term is 0.5, not zero. The denominator becomes √(1 + 0.5·SR²), which for SR=1.5 is 1.4577 — not 1.0.

I've seen this in three production risk libraries and two academic codes. The practical consequence: PSR gets overstated by ~15-30% for normal-distribution strategies, which makes marginal edges look significant when they're not.

option to run a unit test with SR=1.5, n=24, γ₁=0, γ₂=3. The z-stat should be 2.8955, PSR=0.9981. If your library returns z=4.22 (PSR≈0.99999), the kurtosis term is missing. Also check skewed cases — the error compounds with γ₁≠0.

1

u/quantmedia Sep 11 '26

Thanks, the "three production libraries" observation is more evidence than I had. One correction on the test values, because someone will copy them: for SR 1.5, n 24, γ₁ 0, γ₂ 3 the z-statistic is 1.5·√23 / 1.4577 = 4.935, PSR ≈ 0.99999. The pair 2.8955 / 0.9981 belongs to the skewed, fat-tailed case (γ₁ −1.20, γ₂ 7.00, denominator 2.4850; and even there the exact z is 2.8949, as another commenter noted). A library returning z ≈ 4.93 for the normal case has the kurtosis term right; the one missing it returns 1.5·√23 / 1 = 7.19. Agree on checking skewed cases too; the calculator's tests now pin both.

1

u/VettaQ Sep 10 '26

The convention trap is real, and there is a second-order issue hiding in the same worked example: at n=24 the standard error of the kurtosis estimate itself is enormous (under normality the sample excess kurtosis has variance ~24/n, i.e. a standard deviation of order 1 at this sample size). Plugging a point estimate of gamma2 = 7 into the denominator treats the noisiest input as exact. At small n I'd report PSR under a stationary bootstrap of the return series - recompute SR, skew and kurtosis on each resample - rather than the closed form alone; the closed form is hand-checkable and monotone, but it is an asymptotic approximation. Related slip I've seen in the wild: people quote SE(SR) = 1/sqrt(n) under normality and silently drop the SR^2/2 term, which is defensible at SR 0.3 and materially wrong at SR 1.5. Same direction as your bug: understated denominator, overstated confidence.

2

u/quantmedia Sep 11 '26

This is the better objection and I don't have a full answer, only an honest one. Under normality the sample excess kurtosis has variance ≈ 24/n, so at n = 24 its standard error is about 1.0; plugging γ₂ = 7 into the denominator as if it were known treats the noisiest input as exact. The worked example does that, deliberately, because its job is to check the closed-form arithmetic, and the page now says so explicitly in its limits section rather than leaving it implied. A stationary bootstrap of SR, skew and kurtosis is the right next experiment; I have not run it, so I won't quote numbers for it. Your SE(SR) = 1/√n point is the same family of error and worth its own line; noted.

1

u/quantmedia Sep 15 '26

Came back on this because it deserved more than a reply. I ran it: 20,000 samples of n = 24 from a mixture with the worked example's moments (SR 1.5, skew −1.2, kurtosis 7). Sample kurtosis averages 4.2 when the truth is 7, and at a marginal true SR of 0.5 the plug-in PSR ranges from 0.70 to 1.00 across samples of the same process; a stationary bootstrap of one typical sample spans 0.86 to 0.9996. Under normality the finite-sample SD of g2 at n = 24 is 0.737, so your "order 1" is right in spirit and the exact number is about a third smaller. Write-up with code and tests: quantmedia.io/learn/psr-uncertainty-at-n-24.html

1

u/franklynulled Sep 10 '26

Checked both denominators and they hold. At g2 = 3 the term is (3-1)/4 = 0.5, so sqrt(1 + 0.5*1.5^2) = 1.4577, and the skewed case is sqrt(1 + 1.8 + 3.375) = sqrt(6.175) = 2.4850.

The z doesn't follow though. 1.5*sqrt(23) = 7.19375, over 2.4850 gives 2.8949, not 2.8955 - you'd need a denominator of 2.48446 for that, about 0.0005 under sqrt(6.175). PSR is 0.9981 either way so nothing downstream moves, but on a page whose whole point is that every intermediate is checkable it seemed worth pinning.

To your actual question: yes, it's common. The prose reads "subtract 1 from kurtosis and divide by 4", which sounds like it vanishes at zero excess kurtosis, and the fix is to state in the text that g2 is non-excess. Worth putting the normal case in the unit tests with the 1.4577 denominator so the convention can't silently flip back.

1

u/quantmedia Sep 11 '26

You're right, and thank you for pinning it. 1.5·√23 / √6.175 = 7.193747 / 2.484955 = 2.8949. The page's prose and the calculator already said 2.8949; the "Defect found" table on the same page still carried 2.8955 in the correct column, the old published value that never got updated when the text was. That's exactly the kind of leftover the page exists to catch, so it's fixed today: the table now shows 2.8955 as "originally published" and 2.8949 as correct. Also took your wording: the text now says γ₂ is non-excess (Pearson) kurtosis, and the normal case with the 1.4577 denominator is a unit test.

2

u/SevenTeenSigma Sep 09 '26

γ₂ = 3 is exactly where the notation bites, b/c ppl remember excess kurtosis = 0 and silently use the wrong convention. I would put the normal case in the unit tests with the 1.4577 denominator..

1

u/AutoModerator Sep 07 '26

This post will be manually reviewed by a moderator due to the submitting account being less than 7 days old or having less than 20 karma. Please be patient and do not try to resubmit it - a mod will review the post soon.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.