Value-at-Risk (VaR)

Quantifying potential losses with statistical confidence

What VaR Answers

"With X% confidence, how much could I lose at most over one day?"

VaR is the industry's headline risk metric: one number that turns a whole return distribution into a worst-case threshold.

  • VaR 95% → losses worse than this happen only 5% of the time.

  • VaR 90% → losses worse than this happen 10% of the time.

Visual Intuition

If you imagine the return distribution as a histogram, VaR is simply cutting off the left tail at a specific point. Everything to the left of that cutoff represents the worst-case scenarios that the VaR is measuring.

Practical Interpretation

If a $1 million portfolio has a one-day 95% VaR of $20,000, this means there's a 95% probability that the portfolio won't lose more than $20,000 in a single day—or equivalently, there's a 5% chance of losing more than $20,000.

Formal Definition

For a return random-variable RR and confidence level cc:

VaRc  =    inf{x    FR(x)1c}\operatorname{VaR}_{c} \;=\; -\;\inf\bigl\{\,x\;|\;F_R(x)\ge 1-c\,\bigr\}

With daily simple returns (your data), VaR95\operatorname{VaR}_{95} is just the 5th percentile (a negative number).

Mathematical Explanation:

The formula finds the threshold value xx where the probability of getting a return less than or equal to xx is exactly 1c1-c. The negative sign in front converts this to a loss amount (making VaR typically positive in finance literature, though we keep it negative in our implementation).

How Our Backend Computes VaR

Inside srv.py → compute_custom_metrics():

var_95  = np.percentile(port_returns, 5)   # 5-th percentile
cvar_95 = port_returns[port_returns <= var_95].mean()

var_90  = np.percentile(port_returns, 10)  # 10-th percentile
cvar_90 = port_returns[port_returns <= var_90].mean()

Key points

StepWhat happens
Historical methodUses the empirical distribution – no distributional assumptions.
Daily horizonReturns are daily ⇒ VaR is "1-day". (Annualise ≈ VaR × √252 if needed.)
SignOutput is negative (loss). In the results table you multiply by 100 to show "-2.35%".
CVaR (Expected Shortfall)Mean of the tail beyond VaR – gives the average loss in worst cases.

Interpretation at 95% vs 90%

MetricMeaningUsage
VaR 95%Loss exceeded on 1 trading day in 20 (on average).Standard regulatory benchmark.
VaR 90%Loss exceeded on 1 day in 10.Less conservative – useful for daily P&L limits.

In your results card both numbers appear, helping users see "moderate tails" (90%) vs "deep tails" (95%).

Mathematical Example

Suppose 500 days of daily returns sorted ascending:

PercentileReturn
5% (25th obs)-1.8%
10% (50th obs)-1.1%
  • VaR95=0.018\text{VaR}_{95} = -0.018"95% of the time I lose less than 1.8%."

  • CVaR95\text{CVaR}_{95} might be -2.4% → average loss when the 1.8% barrier is breached.

This example illustrates how VaR gives you a threshold for losses, while CVaR (Conditional VaR) tells you what the average loss is when you exceed that threshold—providing a more complete picture of tail risk.

Alternative VaR Methods (for practitioners)

MethodFormula / IdeaWhen to prefer
Parametric (Variance–Covariance)VaRc=(μ+zcσ)\text{VaR}_{c}= -(\mu + z_c \sigma)Large samples, near-normal returns.
Monte-CarloSimulate thousands of paths; pick percentile.Non-linear pay-offs, derivatives.
Filtered HistoricalGARCH volatility-scaled resampling.Volatility-clustering markets.

Our platform currently uses Historical VaR – transparent, easy to explain, and assumption-free.

Advantage of Historical Method:

The historical approach makes no assumptions about the shape of the return distribution, unlike the parametric method which typically assumes normality. This is especially important for financial returns which often exhibit fat tails (higher kurtosis) and skewness that normal distributions don't capture.

Best-Practice Tips

TipWhy
Report CVaR/ES alongside VaRCVaR is coherent and captures tail magnitude (we already compute both).
Use rolling windowsTail risk drifts; a 1-year rolling VaR plot spots regime changes.
Align VaR horizon with user needDaily for trading desks, 10-day for regulators, monthly for asset allocators.
Beware of leverage & derivativesVaR on returns may understate notional draw-downs; scale appropriately.

Advantages and Limitations

Advantages
  • Simplicity and intuitiveness: Condenses complex risk distributions into a single, easy-to-understand number representing maximum expected loss.

  • Universal applicability: Can be applied to virtually any portfolio of assets regardless of asset class or complexity.

  • Confidence level flexibility: Can be adjusted (90%, 95%, 99%) based on risk tolerance and specific application needs.

  • Regulatory acceptance: Widely adopted by financial institutions and required by regulators as a standard risk measurement tool.

  • Comparative framework: Provides a consistent basis for comparing risk across different portfolios, strategies, or time periods.

Limitations
  • Tail blindness: Provides no information about the severity of losses beyond the VaR threshold, potentially masking catastrophic tail risks.

  • Non-coherent measure: Lacks mathematical subadditivity, meaning the VaR of a combined portfolio can be greater than the sum of individual VaRs.

  • Method sensitivity: Results can vary significantly depending on calculation approach (historical, parametric, Monte Carlo) and parameters.

  • Backward-looking bias: Historical VaR assumes the past distribution of returns accurately reflects future risks, which may not hold during regime changes.

  • Liquidity blindness: Standard VaR calculations don't account for market liquidity constraints that may amplify losses during stress periods.

References

  • Jorion, P. (2006). "Value at Risk: The New Benchmark for Managing Financial Risk." 3rd Edition. McGraw-Hill.

  • Alexander, C. (2008). "Market Risk Analysis, Volume IV: Value-at-Risk Models." Wiley.

  • Dowd, K. (2002). "Measuring Market Risk." Wiley.

  • Danielsson, J. (2011). "Financial Risk Forecasting." Wiley.

How It Appears in Our App

  • Metric row in each optimisation card: "VaR 95%: –2.35%, CVaR 95%: –2.98%"

  • Histogram overlay shows red dashed line at VaR (our distribution plot does this).

  • Tooltip: "Worst daily loss at 95% confidence over back-test period." → links to this page.

Providing both VaR 95% and VaR 90% helps novice users grasp everyday vs. rare-event risk, while practitioners still see the exact empirical thresholds and CVaR tail averages our engine calculates.

Related Topics

Skewness

Measure of distribution asymmetry that affects the shape of the left tail and thus VaR calculations.

Kurtosis

Measure of tail fatness that directly impacts VaR and is particularly important for non-normal distributions.

Sortino Ratio

Risk-adjusted measure that focuses on downside risk, complementary to VaR and CVaR analysis.