Portfolio Resampling and Monte Carlo Simulation for Correlation Stress Testing
The Limits of Historical Data
One of the biggest challenges in risk management is that the future is never exactly like the past. Historical data is a valuable guide, but it can only tell you what has happened, not what will happen. This is particularly true when it comes to correlation.
As we have seen, correlations are not static. They can and do change, sometimes dramatically. A portfolio that was well-diversified based on historical data can become highly concentrated in a real-world crisis.
To get a more robust and forward-looking view of portfolio risk, traders can use computational techniques, such as portfolio resampling and Monte Carlo simulation. These methods allow us to stress-test a portfolio under a wide range of potential correlation scenarios, going beyond what has been observed in the historical data.
Portfolio Resampling
Portfolio resampling is a technique that was developed by Richard and Robert Michaud to address the problem of "error maximization" in traditional mean-variance optimization. The problem is that the optimal portfolio weights from a mean-variance optimizer are very sensitive to the inputs (i.e., the expected returns, volatilities, and correlations). Small changes in these inputs can lead to large changes in the optimal portfolio.
Since the inputs are themselves just estimates, this means that the "optimal" portfolio is often far from optimal in reality. In fact, the errors in the inputs tend to be magnified by the optimizer, leading to a portfolio that is "maximally" wrong.
Portfolio resampling seeks to address this problem by running the optimization many times, each time with a slightly different set of inputs that are drawn from a distribution around the original estimates. This creates a range of different "optimal" portfolios. The final, resampled portfolio is then calculated as the average of all of these individual optimal portfolios.
The result is a portfolio that is more robust and less sensitive to the specific inputs used in the optimization. It is a portfolio that is "good enough" across a wide range of different possible futures, rather than one that is "perfect" in a single, idealized future.
Monte Carlo Simulation for Correlation Stress Testing
Monte Carlo simulation is another effective technique for stress-testing a portfolio. A Monte Carlo simulation is a computer-based simulation that uses random numbers to model the behavior of a system over time. In the context of portfolio risk management, we can use a Monte Carlo simulation to generate thousands of different possible future paths for the assets in our portfolio.
To stress-test for correlation risk, we can design the simulation to include a wide range of different correlation scenarios. For example, we could run a simulation where:
- All correlations spike to +0.9 (a "correlation breakdown" scenario).
- The correlation between two specific assets flips from positive to negative.
- The correlation structure of the portfolio is drawn from a distribution that has fatter tails than the historical distribution (i.e., a distribution that has a higher probability of extreme events).
By running these simulations, we can get a much better sense of the potential range of outcomes for our portfolio and can identify any hidden vulnerabilities. This allows us to answer questions like:
- What is the probability of a drawdown of more than 20% in the next year?
- What is the "Value at Risk" (VaR) of the portfolio at a 99% confidence level?
- How would the portfolio perform in a repeat of the 2008 financial crisis?
Practical Implementation with Python
Here is a simplified Python code snippet that demonstrates the basic idea of a Monte Carlo simulation for a two-asset portfolio:
import numpy as np
# Portfolio parameters
returns = np.array([0.05, 0.06])
vols = np.array([0.1, 0.15])
corr = 0.5
weights = np.array([0.5, 0.5])
# Simulation parameters
num_simulations = 10000
num_days = 252
# Create the covariance matrix
cov_matrix = np.outer(vols, vols) * np.array([[1, corr], [corr, 1]])
# Run the simulation
results = np.zeros((num_simulations, num_days))
for i in range(num_simulations):
daily_returns = np.random.multivariate_normal(returns / num_days, cov_matrix / num_days, num_days)
portfolio_returns = np.sum(daily_returns * weights, axis=1)
results[i, :] = np.cumprod(1 + portfolio_returns)
# Analyze the results
final_values = results[:, -1]
print(f"Average final value: {np.mean(final_values):.2f}")
print(f"5th percentile (95% VaR): {np.percentile(final_values, 5):.2f}")
import numpy as np
# Portfolio parameters
returns = np.array([0.05, 0.06])
vols = np.array([0.1, 0.15])
corr = 0.5
weights = np.array([0.5, 0.5])
# Simulation parameters
num_simulations = 10000
num_days = 252
# Create the covariance matrix
cov_matrix = np.outer(vols, vols) * np.array([[1, corr], [corr, 1]])
# Run the simulation
results = np.zeros((num_simulations, num_days))
for i in range(num_simulations):
daily_returns = np.random.multivariate_normal(returns / num_days, cov_matrix / num_days, num_days)
portfolio_returns = np.sum(daily_returns * weights, axis=1)
results[i, :] = np.cumprod(1 + portfolio_returns)
# Analyze the results
final_values = results[:, -1]
print(f"Average final value: {np.mean(final_values):.2f}")
print(f"5th percentile (95% VaR): {np.percentile(final_values, 5):.2f}")
This is a very basic example, but it illustrates the power of Monte Carlo simulation. By running thousands of simulations, we can get a much more complete picture of the risk in our portfolio than we could from historical data alone.
Conclusion
Portfolio resampling and Monte Carlo simulation are effective computational techniques that can help traders to get a more robust and forward-looking view of portfolio risk. By going beyond the limitations of historical data, these methods allow us to stress-test a portfolio under a wide range of different correlation scenarios and to build more resilient portfolios that are better able to withstand the inevitable storms of the market.
