Value at Risk Calculator — Parametric, Historical & Monte Carlo
Compute parametric, historical, and Monte Carlo value at risk with EWMA volatility, expected shortfall, stressed VaR, and a seeded, reproducible backtest.
Value at Risk (VaR) Calculator
A clear path from inputs to results.
For portfolio and risk managers who must put a number on downside exposure: how much a book can lose over a set horizon at a given confidence. The calculator runs the three standard estimators side by side, delta-normal, historical simulation, and Monte Carlo, plus expected shortfall, an EWMA volatility forecast in the RiskMetrics style, and a stressed variant with scaled volatility and shifted mean. Comparing the methods on the same inputs shows how much of your risk number is model choice rather than fact.
How to use
- Enter the portfolio value and set the daily mean return and daily volatility as decimals, for example 0.012 for 1.2%.
- Choose the confidence level (90% to 99.9%) and the holding period in days; the parametric VaR and expected shortfall update immediately from the normal quantile.
- Set the EWMA decay lambda (the RiskMetrics daily default is 0.94) to see the volatility-forecast card reweight recent squared returns.
- Set the sample length, Monte Carlo paths, and the seed; the historical and Monte Carlo VaR are then exactly reproducible.
- Use the stress controls, a volatility multiplier and a mean shift, to read the stressed VaR card under harsher assumptions.
- Compare the four loss cards and the backtest chart, which counts how many sample losses would have exceeded the parametric VaR.
The formula
Reference: RiskMetrics Technical Document (J.P. Morgan, 1996) for the EWMA recursion with lambda = 0.94 on daily data; Basel Committee on Banking Supervision market-risk framework for VaR at 99% over 10 days; Hull, Options, Futures, and Other Derivatives (VaR and expected shortfall chapters).
Worked example
A $1 million book, 99% VaR over 10 days
- Portfolio $1,000,000, daily mean return 0.015%, daily volatility 1.2%, confidence 99%, horizon 10 days, EWMA lambda 0.94, 520-day sample, 25,000 Monte Carlo paths, seed 20260624.
- 1
The 1% lower normal quantile is z = -2.3263, so the 10-day horizon volatility is 0.012 x sqrt(10) = 3.7947% and the horizon mean is 0.15%. Delta-normal VaR is 1,000,000 x (0.037947 x 2.3263 - 0.0015) = $86,779. Expected shortfall replaces the quantile with the tail-average term phi(z)/(1-c) = 2.6652, giving $99,638. With the fixed seed, the synthetic historical sample prices its 99% loss quantile at $80,491 and the 25,000-path Monte Carlo run at $86,372, both within a few percent of the parametric anchor, as they must be when returns are drawn from the same normal law.
Parametric VaR $86,779; expected shortfall $99,638; historical VaR $80,491 and Monte Carlo VaR $86,372 (seed 20260624); EWMA daily volatility 1.42% (22.6% annualized); stressed VaR $191,027 at 1.8x volatility.
Interpreting the result
A $86,779 parametric 99%/10-day VaR means that under the model, one horizon in a hundred should lose more; it says nothing about how much more, which is exactly what the expected shortfall card adds. The three methods bracket your model risk: under normal, independent returns they agree up to sampling noise, and with real data they diverge when tails are fat or volatility clusters, a divergence that is itself information. The EWMA card shows whether recent squared returns justify a higher volatility input than the flat slider, and the stressed VaR re-prices the same quantile under scaled-up volatility.
Assumptions & limitations
- Linear (delta-normal) exposure: the portfolio is a fixed notional on one return stream, with no option gamma or convexity adjustment.
- Parametric VaR and expected shortfall assume normally, independently distributed returns; fat tails, skew, and volatility clustering are outside the closed form, with the EWMA recursion as the partial nod to clustering.
- The historical and Monte Carlo legs draw from the seeded normal generator, so they quantify sampling noise against the parametric anchor rather than the tail shape of any real market.
- Horizon volatility scales with the square root of time, which presumes independent daily returns.
- VaR is a quantile, not a cap, and is not subadditive; expected shortfall is the coherent companion measure.
Frequently asked questions
What does 99% 10-day VaR actually mean?
That under the model assumptions, a 10-day loss larger than the figure should occur on about 1% of horizons, one in a hundred. It is not a maximum possible loss: worse outcomes happen, and their average is what expected shortfall reports. Regulatory market-risk VaR uses the same 99% over 10 days convention.
Why compute VaR three different ways?
Because the methods fail differently. The parametric method is instant but leans fully on normality; historical simulation uses the empirical distribution but is hostage to the chosen window; Monte Carlo is flexible but noisy. When the three agree, your number is robust to method choice; when they diverge, the spread measures model risk.
Is VaR the worst case?
No. It is a quantile of the loss distribution, deliberately silent about the tail beyond it. Expected shortfall, the average loss given that you are past VaR, is the standard repair, and the stressed VaR with a multiplied volatility explores the far tail more crudely but more honestly.
How many Monte Carlo paths are enough?
The precision of a quantile estimate improves roughly like 1/sqrt(N), so one extra decimal digit of accuracy costs about a hundred times the paths. At 25,000 paths the simulated 99% quantile here lands within about half a percent of the analytic value; a quick check is to double the paths and see how much the number moves.
What does the EWMA lambda control?
It is the decay factor in sigma-squared-t = lambda x sigma-squared-(t-1) + (1-lambda) x r-squared-(t-1): how fast old squared returns are forgotten. The 0.94 daily value is the RiskMetrics standard and corresponds to an effective memory of roughly one month; lower lambdas make the forecast jumpier and more reactive to the latest shock.
What is the stressed VaR card doing?
It re-runs the parametric formula with the EWMA volatility multiplied by your stress factor (1.8 by default) and the daily mean shifted by your chosen amount. It answers a different question from VaR: what the same quantile formula would say if volatility stayed at a stressed level instead of its current forecast.
Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.