Data folder: /home/hatch/workspace/maineblock-products/data 

Step 1. Correlation matrices by window, dataset D4 daily
Calm window: 754 trading days; average pairwise correlation 0.344; range 0.10 to 0.74.
Named calm pairs: GE-WMT 0.10 (the lowest), JPM-WFC 0.74 (the highest), AAPL-MSFT 0.63.
Crisis window: 62 trading days; average pairwise correlation 0.738; range 0.38 to 0.94.
Named crisis pairs: WMT-XOM 0.38 (the lowest), AAPL-MSFT 0.94 (the highest), JPM-WFC 0.93, GE-WMT 0.40.

Step 2. Forbes and Rigobon style adjustment
Shared driver SPY: crisis variance 21.59 times its calm variance, so delta is 20.59.
Average crisis correlation after the adjustment: 0.252 (the raw average is 0.738).

Step 3. The holdings panel of Section 14.5
Point-in-time members at January 31, 2020: 505; of those, 438 appear in the price layer. With complete monthly data: 435 names, 71 monthly returns each.
Average single-stock volatility: 31.55 percent a year. Average pairwise correlation: 0.366.
Plug-in floor at the panel's own inputs: 31.55 x sqrt(0.366) = 19.08 percent.

Step 4. The diversification simulation (seed 20261020)
Names  1: simulated 31.7 percent (chapter prints 31.6).
Names  2: simulated 26.3 percent (chapter prints 26.3).
Names  3: simulated 24.2 percent (chapter prints 24.1).
Names  5: simulated 22.3 percent (chapter prints 22.5).
Names  8: simulated 21.3 percent (chapter prints 21.3).
Names 10: simulated 20.8 percent (chapter prints 20.8).
Names 15: simulated 20.4 percent (chapter prints 20.4).
Names 20: simulated 20.1 percent (chapter prints 20.1).
Names 30: simulated 19.8 percent (chapter prints 19.8).
Names 50: simulated 19.6 percent (chapter prints 19.6).

Part B. Solution to the R companion lane: five non-bank stocks
AAPL-MSFT: calm 0.63, crisis 0.94, adjusted 0.52.
AAPL-XOM: calm 0.37, crisis 0.70, adjusted 0.21.
AAPL-WMT: calm 0.22, crisis 0.69, adjusted 0.20.
AAPL-GE: calm 0.25, crisis 0.75, adjusted 0.23.
MSFT-XOM: calm 0.40, crisis 0.69, adjusted 0.20.
MSFT-WMT: calm 0.27, crisis 0.71, adjusted 0.21.
MSFT-GE: calm 0.21, crisis 0.74, adjusted 0.23.
XOM-WMT: calm 0.26, crisis 0.38, adjusted 0.09.
XOM-GE: calm 0.30, crisis 0.81, adjusted 0.28.
WMT-GE: calm 0.10, crisis 0.40, adjusted 0.09.
Averages over the ten pairs: calm 0.300, crisis 0.681, adjusted crisis 0.227.

Chapter 14 lab complete.
