Student-T VaR

The Student-T VaR takes the quantile of a Student-T distribution fitted to the returns, whose fat tails suit financial returns better than the normal distribution.

The formula for the Student-T VaR is as follows:

\[\text{Student-T VaR} = \text{Location} + \text{Scale} \cdot \text{InverseStudentT}(\alpha, v)\]

Where InverseStudentT is the quantile function of the standard Student-T distribution, alpha the tail probability (0.05 for the 95% confidence level), and the degrees of freedom v, Location and Scale are fitted to the returns by maximum likelihood. The fewer the degrees of freedom, the fatter the tails and the worse the VaR compared with the Gaussian VaR.

The Value at Risk (VaR) is a risk measure: the return that a period only falls below with a small probability alpha, so a 5% VaR of -0.03 means a loss of more than 3% in about one period out of twenty. It is the most widely used measure of downside risk in banking and asset management: risk managers set limits with it and the Basel rules built banks’ market-risk capital on it (their current framework uses the Expected Shortfall), because it sums up the risk of a position in one number in the unit that matters, the loss. The VaR is a return (negative for a loss). The methods differ in how they estimate the tail of the returns, from the plain history to fitted distributions and volatility models.

A VaR says how bad a period gets at the chosen confidence level, not how bad the periods beyond it are, so two assets with the same VaR can have very different tails (see the Conditional Value at Risk for that). Compare assets over the same period and confidence level. Scaling a daily VaR to a longer horizon with the square root of time assumes independent returns, which tends to understate risk when volatility clusters.

Also known as: Student-t VaR, t VaR.

In the Finance Toolkit this is get_value_at_risk with method="studentt", the same function as Value at Risk (VaR).

Example · BTCUSD, ETHUSD, ^GSPC · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_value_at_risk:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["BTCUSD", "ETHUSD", "^GSPC"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.risk.get_value_at_risk(method="studentt", period="yearly", within_period=True)

Which returns:

Share