The Claude Quant PlaybookDownload ebookDownload ebook

Student's t distribution

intermediateDistributions10 of 11

A bell-shaped curve with fatter tails than the normal. With few degrees of freedom big moves are far more likely; as ν grows it turns into the normal.

Build a trading system with Claude.Download ebook

01The formula

the density at t
degrees of freedom: small means fat tails, large means close to normal
the gamma function, which extends the factorial to non-whole numbers
the value, measured in scale units like a z-score

02See it move

03Where it is used

04Why traders use it

Market returns have more extreme days than the normal predicts. The t distribution adds that with one extra number, ν, and also gives the right test when volatility is estimated from the data.

05Worked example

With 4 degrees of freedom, a move beyond 3.0 scale units either way has chance 3.994%. Under the normal it is only 0.270%: the t makes it 14.8× as likely.

06How it is built

  1. Take a standard normal and an independent chi-squared variable with degrees of freedom.
  2. Form : a normal divided by a noisy estimate of its own scale.
  3. When happens to be small, is large, which fattens the tails.
  4. Working out its density gives the formula above; as , and becomes normal.

07The common mistake

Matching the scale but not the variance. A t with ν degrees of freedom has variance ν/(ν − 2), above 1, so to fit a return series you must shrink the scale or you will overstate volatility.

08In Python and LaTeX

from scipy.stats import t, norm
nu, k = 4, 3
print(round(2*t.sf(k, nu), 5), round(2*norm.sf(k), 5))
f(t) = \frac{\Gamma\!\left(\frac{\nu + 1}{2}\right)}{\sqrt{\nu\pi}\,\Gamma\!\left(\frac{\nu}{2}\right)} \left(1 + \frac{t^2}{\nu}\right)^{-\frac{\nu + 1}{2}}

09Where it fits

Rather not code the maths yourself? Describe your trading idea and let AI build the bot.

Build a bot with AgenKit

The worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.