Gaussian VaR
The Gaussian VaR, also called the parametric or variance-covariance VaR, assumes normally distributed returns.
The formula for the Gaussian VaR is as follows:
\[\text{Gaussian VaR} = \text{Mean} + z \cdot \text{Std}\]Where Mean and Std are the average and the sample standard deviation of the returns (with n - 1 in the denominator), z the standard normal quantile at alpha and alpha the tail probability (0.05 for the 95% confidence level). It needs only the mean and the standard deviation, but returns have fatter tails than the normal distribution, so at small alphas it tends to understate the loss.
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: parametric VaR, variance-covariance VaR, delta-normal VaR, normal VaR.
In the Finance Toolkit this is get_value_at_risk with method="gaussian", 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="gaussian", period="yearly", within_period=True)
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The data frequency for returns. Options are: “daily”, “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “daily”. | "weekly" |
alpha | float | The tail probability for the VaR calculation (e.g., 0.05 for the 95% confidence level). Defaults to 0.05. | 0.01 |
within_period | bool | Whether to calculate VaR within the specified period or for the entire period. Thus whether to look at the VaR within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to False. Note that this requires intraday data when period = ‘daily’, since a single day only nests observations when intraday data was fetched. | True |
rolling | int | The rolling window size to use for the calculation. If set, VaR is calculated over a rolling window of this many periods across the full return history instead of per period (e.g. a rolling 60-day VaR). Only available for the historic, GARCH and filtered historic methods (the number of returns of every fit, at least 100); see get_var_backtest for a rolling, out-of-sample VaR path under the other parametric distributions. At least 2. Defaults to None. | 20 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the VaR values over time. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
method | str | The estimator of the VaR, a distribution or a model. Options are: “historic” (Historical VaR, the empirical quantile), “gaussian” (Gaussian VaR, a normal distribution), “cornish-fisher” (Cornish-Fisher VaR, the Cornish-Fisher expansion), “studentt” (Student-T VaR, a Student-T distribution), “evt” (EVT VaR, Extreme Value Theory), “kernel” (Kernel VaR, a Gaussian kernel density), “garch” (GARCH VaR, a GARCH-family model), “filtered_historic” (Filtered Historical VaR, filtered historical simulation), “expectile” (Expectile VaR, the alpha expectile). Defaults to “historic”. The parametric distributions use the sample standard deviation; “cornish-fisher” adjusts the gaussian quantile for the skewness and excess kurtosis of the returns (see var_model.get_var_cornish_fisher), “studentt” uses the quantile of a Student-T distribution fitted by maximum likelihood and “kernel” the quantile of a Gaussian kernel density of the returns. “garch” fits a GARCH-family model per ticker (and per period with within_period), which takes one to five seconds per fit and needs at least 100 returns; a ticker or period with fewer is NaN. “filtered_historic” fits the same model. | |
threshold_percentile | float | Only used with the “evt” method. The percentile of losses above which the Generalized Pareto Distribution is fitted; alpha can be at most 1 - threshold_percentile, and a larger alpha gives an empty result (with a logged error). The fit needs at least 10 losses above the threshold (about 200 returns at 0.95); a period with fewer is NaN, with a logged warning. Defaults to 0.95. | 0.9 |
refit_every | int | Only used with the GARCH and filtered historic methods and rolling. The number of returns between two fits; the fitted model filters the returns in between. Every refit after the first starts from the previous fit and takes a fraction of a second. Defaults to 21. | 21 |
garch_method | str | Only used with the GARCH and filtered historic methods. The variance model of get_garch. Options are: “garch” (GARCH), “gjr” (GJR-GARCH), “egarch” (EGARCH), “igarch” (IGARCH), “aparch” (APARCH), “tgarch” (threshold GARCH), “ngarch” (nonlinear GARCH), “avgarch” (absolute value GARCH), “nagarch” (nonlinear asymmetric GARCH), “component” (component GARCH), “figarch” (FIGARCH). Defaults to “garch”. | "garch" |
garch_distribution | str | Only used with the GARCH and filtered historic methods. The innovation distribution. Options are: “normal” (normal), “t” (Student-t), “skewt” (Hansen’s skewed Student-t), “skewt_fernandez_steel” (Fernández and Steel’s skewed Student-t), “ged” (generalized error distribution), “johnson_su” (Johnson’s SU). Defaults to “normal”. | "normal" |
transform | str | list[str] | None | Time series steps applied in order, such as “sma:12” (moving average), “ema:12”, “std:12”, “zscore:60”, “percentile:120”, “yoy”, “pct_change:3,annualize:3”, “log”, “diff”, “cumsum” or “hp_trend” and “hp_cycle” (Hodrick-Prescott), before growth. A window needs that many periods of history, so the first periods can be empty. Defaults to None. | None |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
Which returns:
| Item | BTCUSD | ETHUSD | ^GSPC | Benchmark |
|---|---|---|---|---|
| 2021 | -0.0679 | -0.0874 | -0.0125 | -0.0123 |
| 2022 | -0.0573 | -0.0769 | -0.0258 | -0.0258 |
| 2023 | -0.0351 | -0.0383 | -0.0127 | -0.0126 |
| 2024 | -0.0435 | -0.0544 | -0.0122 | -0.0121 |
| 2025 | -0.0360 | -0.0642 | -0.0188 | -0.0195 |
5 rows
References
- Paper Jorion, P. (2006). “Value at Risk: The New Benchmark for Managing Financial Risk.” 3rd edition, McGraw-Hill.
- Paper J.P. Morgan and Reuters (1996). “RiskMetrics Technical Document.” 4th edition.
- Library Shares similar logic as PerformanceAnalytics (R)’s VaR (Historical VaR, Gaussian VaR, Cornish-Fisher VaR)
- Library Shares similar logic as quantstats’ value_at_risk (Gaussian VaR)