PART XIII · Chapter 106 · 598 / 660

Lesson 598. Correlation, covariance and diversification: when correlations change in a crisis

Chapter 106. Statistical Foundations of Backtesting: Fat Tails, Bayes, CLT & Bootstrap

Here is a four-and-a-half-year backtest of an account holding two assets half and half. The correlation of the two assets is a little over 0.2, and the account's volatility came out more than 3 percentage points lower than that of one asset. The report called this difference the diversification effect. The number is not wrong. But if those four and a half years contained no crisis at all, the number says nothing about the account in a crisis.

Lesson 436 covered the formula that computes the volatility of a two-asset account from weights, volatilities and correlation, and Lesson 437 covered the record of real stock-bond correlations that changed even in sign from period to period. This lab takes up the testing questions. With synthetic data, it computes in which sample the correlation and covariance were measured, how much the estimates swing, and how to check the observation that "correlations rose in the crisis."

1. Two synthetic data sets and the calculation conventions

The data are two synthetic data sets made with fixed seeds. Both are daily returns from a normal distribution with mean 0, over 2,520 periods (about 10 years if read as daily data).

  • Data with changing regimes (seed 20261118): a calm segment of 1,134 periods (both assets with standard deviation 1%, correlation 0.2), a crisis segment of 126 periods (standard deviation 2.5%, correlation 0.8), another calm segment of 1,134 periods, and another crisis segment of 126 periods, in that order. The first calm segment is used as a backtest sample that never saw a crisis.
  • Data with a fixed correlation (seed 20261119): standard deviation 1% and correlation 0.4 from start to finish; nothing changes.

The account is a hypothetical example for teaching that simply holds the two assets with equal weights; it is not a trading rule. Volatility is annualized by multiplying the daily standard deviation by √252. The lengths and sizes of the regimes are settings chosen to show the calculation, not the frequency of crises in real markets.

2. The diversification effect measured on a calm sample

In the first calm segment, the measured correlation is 0.22, the annual volatilities of the two assets are 16.3% and 15.6%, and the account's volatility is 12.4%. That is 3.5 percentage points lower than the average volatility of one asset. Looking only at this sample, the diversification effect seems clear.

Put the same account in the two crisis segments (252 periods in total), and the correlation is 0.82 and the account's volatility is 40.6% a year. That is 3.3 times the 12.4% estimated in sample. Measured in in-sample daily standard deviations, the account lost more than 3 of them on 48 of the 252 days, and the worst day was 9.7 times. As medians of the same experiment repeated with 200 seeds, these were 41 days and 8.7 times. If you assume that the in-sample distribution carries on unchanged as a normal distribution, about 0.34 days with a loss beyond 3 standard deviations are expected in 252 days.

Bar chart of annualized volatility measured on synthetic data with changing regimes. In the calm sample, the average of one asset is 15.9% and the account 12.4%. The same account is 17.3% over the whole 10 years and 40.6% over the 252 crisis periods, 3.3 times the in-sample estimate.

Two things combined to make the account's volatility larger in the crisis. The volatility of each asset grew 2.5 times, and the correlation rose from 0.2 to 0.8, so the part that used to offset each other shrank. Computed from the set values, the account's daily standard deviation is about 0.77% in the calm segment and about 2.37% in the crisis segment, about 3.1 times (the formula of Lesson 436). Repeating the same experiment with 200 seeds, the crisis-segment realized volatility ÷ the in-sample estimated volatility had a median of 3.06 times (5th percentile 2.84 times, 95th percentile 3.32 times).

Measuring the whole 10 years at once does not give the answer either. The full-period correlation is 0.47 and the account's volatility is 17.3%, just an average that mixes the numbers of the two regimes, neither the 12% range of calm times nor the 40% range of crises. So when you write down a risk number, write down which regimes the sample contained.

3. Correlation swings even when it is fixed

In the data with the correlation fixed at 0.4, a rolling correlation measured with a 60-period window (about 3 months) moved from 0.02 to 0.67, even though the true value did not change. The sample changes every time the window moves.

Lines of the 60-period rolling correlation of two synthetic data sets. Data with the correlation fixed at 0.4 still swing from 0.02 to 0.67, and the data with changing regimes move up and down around 0.2 in the calm segments and rise to near 0.8 in the two crisis segments. The range is −0.15 to 0.88.

The size of this swing can be known in advance with an approximation. If observations are independent and normally distributed, the standard error of the correlation estimate is about (1 − correlation²) ÷ √number of observations. With a correlation of 0.4 and 60 observations, (1 − 0.16) ÷ √60 = about 0.108, and the standard deviation of the 2,461 rolling correlations of the fixed data was 0.107. As the median of 200 seeds it is 0.108.

The rolling correlation of the data with changing regimes moved from −0.15 to 0.88. In the figure, the rise in the crisis segments is clearer than the swing of the fixed data, but even within the calm segments it moves up and down widely around 0.2. The fact that one 60-period correlation exceeded 0.5 cannot tell you by itself whether the regime changed or the sample swung. Compare against a baseline: the swing shown by data with a fixed true correlation, in windows of the same length.

4. The trap of correlations measured only on big days

There is a calculation often used to check the observation that "correlations rise in a crisis." You pick only the days when the market moved a lot, measure the correlation, and compare it with normal times. But this calculation creates a difference even in data where the correlation did not change at all.

In the data with the correlation fixed at 0.4, measuring the correlation only on the 10% of days with the largest moves of the first asset gives a median of 0.68 (5th percentile 0.62, 95th percentile 0.73) across 200 seeds. Picking only the half of days with small moves gives 0.16, and picking only the 10% of days on which the first asset fell most gives 0.18. Measured on all days, it is 0.40. The true correlation was 0.4 on every day.

Bar chart of the median correlation measured on synthetic data with the true correlation fixed at 0.4, by which days are picked. All days 0.40; the 10% of days with the largest moves of the first asset 0.68; the half of days with small moves 0.16; the 10% of days with the largest declines 0.18.

The reason is the way the days are picked. If you pick only the days on which the first asset moved a lot, the swings of the first asset grow within that sample. The share of the second asset's moves that followed the first then grows relatively, and the correlation rises. Picking only small-move days does the opposite. The correlation also fell on the 10% of days with the largest declines, because all of those days were big down days, so within them the swings of the first asset are actually small. Either way, what changed the number is the way the days were picked.

Forbes and Rigobon (2002) pointed out that correlations measured in periods of higher volatility are biased upward even when the underlying relationship is the same. Boyer, Gibson and Loretan (1999) wrote that such "correlation breakdowns" arise easily even in data whose distribution does not change and whose correlation is fixed, and they also noted that correlations do actually change over time. To tell the two cases apart, you need a benchmark for comparison.

So if the correlation on big days comes out high, compare it with the value you get by applying the same picking to synthetic data with a fixed correlation. With the settings of this lesson, the fixed data also give about 0.68, so a value has to be clearly higher than 0.68 to be read as evidence of a regime change. The 0.82 shown in the crisis segments of the regime data in section 2 gains meaning only after such a comparison.

5. How to write correlations into the test record

Correlations and covariances are the ingredients of an account's risk numbers. If you do not know which sample an ingredient came from, you cannot read the risk number either. So write down the following together.

  • The estimation period and frequency, and whether that period contained a crisis segment
  • The correlation estimate and the approximate standard error (with the number of observations)
  • If correlations split into big days and small days were used, the benchmark value from applying the same picking to data with a fixed correlation
  • Separately from the calm-segment estimate, the account volatility for a correlation close to 1 (Lesson 436 section 6, the joint-decline scenario of Lesson 437)

The record for this lesson is a covariance source table. For each correlation and volatility, keep one line with the estimation period, the regime of that period, the standard error, the null benchmark value for conditional correlations, and the account volatility under a crisis assumption. The review frequency and metrics for real assets are covered in Lesson 469.

Try it yourself

  1. From section 2, read the in-sample account volatility and the realized volatility in the crisis segments and find how many times larger the second is. Compare this with the median of 200 seeds.
  2. Assumptions: a correlation of 0.3 was estimated from 120 observations. What is the approximate standard error? What happens if the observations are cut to 30?
  3. From the results of section 4, read the fixed data's correlation on "the 10% of days with the largest moves" and on "all days." If a report wrote "correlations rose in the crisis" based on a correlation of 0.70 on big days and 0.40 on all days in real data, what should you ask?
  4. Assumptions: both assets have an annual volatility of 16%, equal weights. Compute the account volatility for a correlation of 0.2 and of 0.8.

Answers

First, 40.6% ÷ 12.4% = about 3.3 times. It is a little larger than the median of 200 seeds, 3.06 times, but within the range. Either way, a volatility estimated on a calm sample reads the account in a crisis about three times too small.

Second, (1 − 0.09) ÷ √120 = about 0.083. With 30 observations, (1 − 0.09) ÷ √30 = about 0.166, twice as large. A 0.3 measured from 30 observations is a number that could be anywhere between 0 and 0.6.

Third, even in the fixed data, the correlation on the 10% of days with the largest moves had a median of 0.68, and on all days it was 0.40. First ask that report what the same picking gives when applied to data with a fixed correlation. The 0.70 is almost the same as this lesson's benchmark of 0.68, so it is hard to read as evidence that the correlation changed.

Fourth, the account variance is (0.5 × 16)² × 2 × (1 + correlation). With a correlation of 0.2, 128 × 1.2 = 153.6, so about 12.4%; with a correlation of 0.8, 128 × 1.8 = 230.4, so about 15.2%. Even with unchanged volatility, the correlation alone adds 2.8 percentage points, and when volatility also grows in a crisis, the account volatility becomes much larger, as in section 2.

Data: synthetic data. The regime data use fixed seed 20261118 (calm segments with standard deviation 1% and correlation 0.2, crisis segments with standard deviation 2.5% and correlation 0.8, 2,520 periods). The fixed data use fixed seed 20261119 (standard deviation 1%, correlation 0.4, 2,520 periods). The multi-seed checks use 200 seeds each: 20261120 to 20261319 for the fixed data and 20261320 to 20261519 for the regime data. Every number was read from the results tables computed from these data.

Related lessons