← Back to Financial Concepts
Risk Management

Value at Risk (VaR)

VaR estimates maximum loss over a horizon at a given confidence. A 1-day 95% VaR of $10K means 95% chance you won't lose more than $10K in a day.

90% VaR
$0
95% VaR
$0
99% VaR
$0

The Mathematics

VaR = Portfolio × σ × √T × Z(α)

Z-scores: 1.28 (90%), 1.645 (95%), 2.33 (99%)

How It Works

// Parametric VaR calculation
function calculateVaR(V, sigma, T, confidence) {
    const zScores = { 90: 1.282, 95: 1.645, 99: 2.326 };
    const z = zScores[confidence];
    
    // VaR = V × σ × √T × z
    const varAmount = V * sigma * Math.sqrt(T) * z;
    
    return varAmount;
}

// Example: $1M portfolio, 2% daily vol, 1 day, 95%
calculateVaR(1000000, 0.02, 1, 95); // returns $32,900