Calculation contract
v_p = w1^2*v1 + 2*w1*w2*c12 + w2^2*v2; sigma_p = sqrt(v_p)| Input | Allowed values | Meaning |
|---|---|---|
| weights | Two nonnegative decimals summing to one | Capital weights in covariance asset order |
| covariance | Symmetric PSD 2x2 matrix; entries -100 to 100 | Same-frequency squared decimal-return units; nonnegative diagonal |
Method and interpretation
The cross term is essential. Adding weighted standalone variances while ignoring covariance changes the model rather than simplifying the same calculation. With default weights 0.6/0.4, the variance is 0.01888; its square root is approximately 0.1374045.
No annualization is hidden in the engine. Annual covariance produces annual volatility; period covariance produces period volatility. Inputs labelled percentages must first be converted to decimals, and covariance scales with the square of that conversion.
Where the reference stops
The matrix summarizes second moments, not tail loss or liquidity. Shorting, derivatives, nonlinear exposure and cash flows are outside this two-asset card. Symmetry and positive semidefiniteness are mathematical admission checks, not evidence that an estimate is economically reliable.
Published synthetic inputs
{
"weights": [
0.6,
0.4
],
"covariance": [
[
0.04,
0.006
],
[
0.006,
0.01
]
]
}Frozen calculation output
{
"variance": 0.01888,
"volatility": 0.13740451229854134
}Two aligned long-only weights and a same-frequency covariance matrix. No additional annualization is applied.
Verification coverage
- Direct quadratic form, zero weights and perfectly offsetting covariance checked.
- Order consistency, weight sums and PSD bounds validated.
Unit and independent-reference checks test arithmetic and rejection rules, not future investment performance.
Method references
Read the assumptions in context
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.