A fraction α of a sum is invested in asset X and 1 − α in asset Y. The risk Var(αX + (1 − α)Y) is smallest at the α of (5.6), estimated from 100 past pairs of returns by (5.7): α̂ = 0.576. How precise is that number? We cannot collect new data, but we can resample the 100 pairs with replacement, recompute α̂* each time, and use the spread of the α̂* as the standard error (5.8). Since the Portfolio data were simulated from a known population, here we can also check the answer against the truth.
Each resample draws 100 row numbers uniformly with replacement; α̂* is (5.7) with the sample variances and covariance of the resampled rows (divisor n − 1). "Population" draws new data sets of 100 pairs from the bivariate normal law that generated Portfolio (σX2 = 1, σY2 = 1.25, σXY = 0.5, so α = 0.6), which is possible only because the data are simulated.
code/ch05_resampling_methods.py (alpha_hat, alpha_se_normal, Figure 5.10).