The fixed example
The two exposures are deliberately unnamed. Their constructed covariance matrix has variances 0.04 and 0.01 and covariance 0.006. They could represent a mathematical example at any single common frequency; no market history, price feed or observed asset relationship is claimed. Capital weights are 0.6 and 0.4. Keeping the labels generic avoids importing an unsupported assumption that a familiar asset class must have these particular risks.
Three questions can be asked of these same inputs. What is total variance? How is its square root attributed through the Euler calculation? Which long-only combination would minimize the supplied variance? These are different mathematical questions. None asks which allocation should be used for a real portfolio or whether the matrix is a reliable forecast.
Reconcile the quadratic form
The first diagonal term is 0.6 squared times 0.04, or 0.0144. The second is 0.4 squared times 0.01, or 0.0016. The cross term is twice 0.6 times 0.4 times 0.006, or 0.00288. Their sum is 0.01888 and the square root is about 0.1374045. Omitting the cross term would change the result and implicitly assume a different relationship between the two exposures.
Separate attribution from optimization
The Euler numerators are 0.01584 and 0.00304. Their sum equals total variance; dividing each by total volatility gives contributions that add to that volatility. Dividing instead by total variance gives risk shares of about 83.8983% and 16.1017%. The first exposure therefore contributes more than its 60% capital share under this particular matrix. This is not an assertion about every portfolio with a 60/40 label.
The minimum-variance formula answers a separate question. Its first weight is 0.004 divided by 0.038, approximately 10.5263%, with the remainder in the second exposure. That answer minimizes the supplied quadratic form subject to the long-only constraint. It does not account for expected returns, uncertainty about covariance, taxes or the cost of moving from the current holdings.
What the exercise establishes
The three model cards share an input matrix, allowing the arithmetic and meanings to be compared directly. The downloadable outputs preserve both weights and covariance. The independent checker reconciles the variance, Euler sums and analytic minimum, including boundary cases. These checks establish implementation consistency on a constructed example; they neither estimate a real portfolio's risk nor validate an allocation strategy. Any real application needs source identity, measurement dates, currency treatment and a research protocol before these formulas are useful.
| Quantity | Synthetic result | Interpretation |
|---|---|---|
| Portfolio variance | 0.01888 | Input-frequency squared return units |
| First capital weight | 0.6 | Capital fraction |
| First Euler risk share | 0.8389830508 | Share of the variance-based volatility attribution |
| First minimum-variance weight | 0.1052631579 | A different allocation question |
Reproduce the referenced calculations
Primary references
These sources support methods and conventions. The example values are original constructions, not observations extracted from these documents.
Related investigations
Allocation referencesTwo-Asset Minimum Variance Depends on the Feasible Weights
A closed-form minimum can imply shorting or leverage. Long-only and allocation bounds change the answer without changing the covariance inputs.
Risk measurementComponent Risk Contributions Are Not Capital Weights
Volatility contributions allocate a portfolio-level estimate. They can be negative or exceed the total, even when every capital weight is positive.
Risk measurementCovariance Units and Frequency Must Travel With the Matrix
Decimal versus percentage returns and daily versus annual horizons change covariance scales. Correct matrix multiplication cannot repair mismatched units or unsupported time aggregation.