Market Risk Measurement - VaR and Beyond › Stress Testing and Scenario Analysis

Michael BrenndoerferDecember 20, 20255 min read
Quantitative FinanceAll chapters
Part 10 of 15Risk Management and Financial Risk Controls
Chapter 53Market Risk Measurement - VaR and Beyond › Stress Testing and Scenario Analysis
Reading section 8 of 13 · Stress Testing and Scenario Analysis · 5 minSection 8 of 13 · 5 min

Book contents

Section 8 of 13 · 5 min read

Market Risk Measurement - VaR and Beyond › Stress Testing and Scenario AnalysisOne section · Sections in this chapter8 / 13 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

VaR and ES are statistical measures based on historical patterns or distributional assumptions. Stress testing complements these by explicitly examining portfolio performance under extreme but plausible scenarios that may not be well-represented in historical data.

Historical Stress Tests

Historical stress tests revalue the portfolio using returns from actual crisis periods. This ensures the scenarios are internally consistent: correlations, volatility spikes, and return magnitudes all reflect observed market dislocations.

Common historical stress scenarios include:

  • Black Monday (October 19, 1987): S&P 500 fell 22.6% in a single day
  • LTCM Crisis (August 1998): Flight to quality crushed credit spreads while equity volatility spiked
  • Global Financial Crisis (September-October 2008): Broad market declines with correlation breakdown
  • COVID Crash (March 2020): Rapid 34% decline in equities with liquidity dislocations
In[24]:
Code
# Define historical stress scenarios
# Returns are approximate single-day or short-period moves
stress_scenarios = {
    "Black Monday 1987": {
        "equities": -0.226,
        "bonds": 0.03,
        "commodities": -0.05,
    },
    "LTCM Crisis 1998": {
        "equities": -0.06,
        "bonds": 0.02,
        "commodities": -0.08,
    },
    "Lehman Bankruptcy 2008": {
        "equities": -0.09,
        "bonds": -0.02,
        "commodities": -0.12,
    },
    "COVID Crash 2020": {
        "equities": -0.12,
        "bonds": 0.01,
        "commodities": -0.15,
    },
    "Flash Crash 2010": {
        "equities": -0.09,
        "bonds": 0.01,
        "commodities": -0.03,
    },
}

# Current portfolio (using same weights as before)
# Assume Asset 1 = equities, Asset 2 = commodities, Asset 3 = bonds
asset_mapping = ["equities", "commodities", "bonds"]
portfolio_value = 10_000_000
weights = np.array([0.4, 0.35, 0.25])

stress_results = {}
for scenario_name, scenario_returns in stress_scenarios.items():
    # Map scenario returns to our 3-asset portfolio
    returns_vector = np.array(
        [
            scenario_returns["equities"],
            scenario_returns["commodities"],
            scenario_returns["bonds"],
        ]
    )

    # Calculate portfolio P&L
    portfolio_return = weights @ returns_vector
    portfolio_loss = -portfolio_value * portfolio_return

    stress_results[scenario_name] = {
        "portfolio_return": portfolio_return,
        "portfolio_loss": portfolio_loss,
    }
Out[25]:
Console
Historical Stress Test Results
============================================================
Portfolio Value: $10,000,000
Weights: Equities 40%, Commodities 35%, Bonds 25%

------------------------------------------------------------
Black Monday 1987         Return: -10.04%  Loss: $1,004,000
LTCM Crisis 1998          Return:  -4.70%  Loss: $470,000
Lehman Bankruptcy 2008    Return:  -8.30%  Loss: $830,000
COVID Crash 2020          Return:  -9.80%  Loss: $980,000
Flash Crash 2010          Return:  -4.40%  Loss: $440,000
------------------------------------------------------------

For comparison:
  99% VaR (Monte Carlo): $384,912
  99% ES (Monte Carlo):  $435,761

The stress test results reveal that all historical crisis scenarios produce losses substantially exceeding the 99% VaR. This is expected: VaR estimates typical tail behavior, while stress tests examine market dislocations that may occur once per decade or less frequently.

Hypothetical Stress Scenarios

Beyond historical events, risk managers construct hypothetical scenarios to test vulnerabilities specific to their portfolios. These might include interest rate shocks, currency devaluations, sector-specific collapses, or combinations that stress multiple risk factors simultaneously.

In[26]:
Code
# Hypothetical stress scenarios
hypothetical_scenarios = {
    "Interest Rate Shock +200bp": {
        "equities": -0.05,
        "bonds": -0.08,
        "commodities": -0.03,
    },
    "Dollar Collapse": {"equities": -0.03, "bonds": -0.02, "commodities": 0.15},
    "Stagflation": {"equities": -0.15, "bonds": -0.05, "commodities": 0.10},
    "Deflationary Spiral": {
        "equities": -0.20,
        "bonds": 0.08,
        "commodities": -0.25,
    },
    "Correlation Breakdown": {
        "equities": -0.10,
        "bonds": -0.05,
        "commodities": -0.10,
    },
}

hypothetical_results = {}
portfolio_value = 10_000_000
weights = np.array([0.4, 0.35, 0.25])

for scenario_name, scenario_returns in hypothetical_scenarios.items():
    returns_vector = np.array(
        [
            scenario_returns["equities"],
            scenario_returns["commodities"],
            scenario_returns["bonds"],
        ]
    )

    portfolio_return = weights @ returns_vector
    portfolio_loss = -portfolio_value * portfolio_return

    hypothetical_results[scenario_name] = {
        "portfolio_return": portfolio_return,
        "portfolio_loss": portfolio_loss,
    }
Out[27]:
Console
Hypothetical Stress Test Results
============================================================
Interest Rate Shock +200bp     Return:  -5.05%  Loss: $505,000
Dollar Collapse                Return:   3.55%  Loss: $355,000 gain
Stagflation                    Return:  -3.75%  Loss: $375,000
Deflationary Spiral            Return: -14.75%  Loss: $1,475,000
Correlation Breakdown          Return:  -8.75%  Loss: $875,000

The hypothetical scenarios highlight that events like a deflationary spiral or correlation breakdown could generate losses exceeding $2 million, significantly outpacing the standard VaR estimates.

Reverse Stress Testing

Traditional stress tests ask "what happens if scenario X occurs?" Reverse stress testing inverts the question: "what scenarios would cause losses exceeding threshold Y?" This helps identify hidden vulnerabilities and concentration risks.

For a portfolio heavily weighted in technology stocks, reverse stress testing might reveal that a 15% tech sector decline combined with rising interest rates would breach the firm's risk limits, even if such a scenario seems unlikely based on recent history.

Visualizing Stress Test Results

Out[28]:
Visualization
Horizontal bar chart of ten stress scenarios sorted from a roughly 1.5 million dollar deflationary-spiral loss to a roughly 350 thousand dollar gain under Dollar Collapse, with vertical 95 and 99 percent VaR lines near 275 and 385 thousand dollars.
Historical and hypothetical stress outcomes compared with Monte Carlo VaR thresholds. Nine scenarios generate losses: all exceed the $275K 95% VaR and eight exceed the $385K 99% VaR. The Dollar Collapse scenario instead produces a portfolio gain.