← NCO bridge demos paper (PDF) · verification script
The bridge by Monte Carlo
A random market, a noisy estimate of its covariance, and the out-of-sample variance of the bridge portfolio at every setting of the dial, averaged over many estimates. Nothing here is a formula; it is the algorithm run on data.
The market
Twelve assets in four groups. Each group has one representative (K1 to K4) and one to three other members (m). The representatives are correlated with each other; each member is its own group's representative scaled by a beta, plus independent noise, which is the paper's gateway model. The left matrix is the true correlation, with the groups outlined. The right matrix is a sample correlation estimated from T observations, which is what the portfolio has to be built from. The two disagree less as T grows.
Out of sample, over many estimates
For each of many samples of T observations, the bridge portfolio is built from the sample covariance at every γ from 0 to 1, and its variance is then measured under the true covariance. The chart shows the average of that out-of-sample variance against γ, updating as the draws accumulate. The readout also gives the sample minimum-variance portfolio as its own benchmark, and what the bridge would achieve if it were handed the true covariance, which is lowest at γ = 1 by the paper's Proposition 2; the noisy curve sits above it everywhere.
The portfolios
The weights the bridge holds at the two ends and at the best γ found above, first built from the true covariance and then from the last sample drawn. Bars are grouped by asset; the representatives are the first bar in each group.
The market is drawn from a seeded generator, so the same seed gives the same market. The same algorithm, in Python, is checked against exact arithmetic in the verification script.