Óscar Romero Quincoces

Projects / Master's coursework

Stress testing and VaR

Crisis scenarios for an 18-asset portfolio

2026MIAX master's, Instituto BME
S&P 500 coloured by regime, crisis or calm
Figure 1. S&P 500 coloured by regime, crisis or calm

Summary

A two-state hidden Markov model separates calm from crisis over 2006–2026, copulas model how 18 assets move together, and 10,000 Monte Carlo paths of 126 days give VaR and CVaR for each stress scenario. In a crisis, volatility rises two to four times and correlations go up, just when diversification is needed most.

What it does

A stress-testing system for an 18-asset portfolio over 2006–2026, with no imputation: each asset enters from its real start date. A two-state hidden Markov model separates calm from crisis and picks up 2008, 2020 and 2022. Each regime gets its own marginals and Gaussian copulas, and a simulator draws 10,000 paths of 126 days for three scenarios: 2022 stagflation, the 2008 credit crisis and a loss of confidence in US credit. Each one reports VaR and CVaR at 99%.

Findings

In a crisis, volatility rises two to four times, correlations go up and extreme co-movements become much more common, just when diversification is needed most.

Figures

How much each asset's volatility rises in a crisis
Figure 2. How much each asset's volatility rises in a crisis
Pairwise correlations by regime
Figure 3. Pairwise correlations by regime
99% VaR across the Monte Carlo runs, against the real VaR
Figure 4. 99% VaR across the Monte Carlo runs, against the real VaR

Built with

PythonhmmlearncopulasSciPypandasyfinance