Why Input Checks Matter
A portfolio-risk calculation can be performed correctly and still give a meaningless answer if its inputs are inconsistent. A covariance matrix is not just a table of numbers: its entries must satisfy mathematical conditions that follow from how variances and covariances are defined. Before using portfolio weights, check that the matrix is symmetric, that its diagonal entries are valid variances, that its implied correlations are feasible, and that all inputs use compatible units and time periods.
These checks are useful when reading a data table, reviewing a spreadsheet, or diagnosing an unexpected result. In particular, a negative calculated variance is not a possible level of risk to interpret; it is evidence that at least one input or calculation needs investigation. The checks below support portfolio-risk calculations aligned with the SOA VEE Accounting and Finance syllabus.
Four Checks Before Using the Matrix
Use the same return definition, measurement period, and numerical scale throughout a calculation. For example, a return of 12% may be entered as \(0.12\) or as 12 percentage points. Either convention can be used if it is used consistently. But variances and covariances are in squared return units: if returns are entered as decimals, a standard deviation of 12% corresponds to a variance of \(0.12^2=0.0144\), not \(0.12\).
| Check | What must hold | What a failure suggests |
|---|---|---|
| Symmetry | \(\sigma_{ij}=\sigma_{ji}\) | Data-entry, labeling, or transcription error |
| Diagonal | \(\sigma_{ii}\) is a nonnegative variance | A standard deviation may have been entered as a variance, or units may be mixed |
| Implied correlation | \(\rho_{ij}=\sigma_{ij}/(\sigma_i\sigma_j)\) lies between \(-1\) and \(1\) | A covariance, variance, or unit may be wrong |
| Positive semidefiniteness | \(w^\mathsf{T}\Sigma w\geq 0\) for every \(w\) | The entries cannot all describe one joint set of returns |
| Compatible inputs | All returns, variances, covariances, and weights refer to compatible definitions and periods | A scale or time-period conversion may be missing |
For two assets, the correlation check also gives a convenient matrix test. If their variances are \(\sigma_1^2\) and \(\sigma_2^2\), and their covariance is \(\sigma_{12}\), then the matrix is positive semidefinite precisely when the variances are nonnegative and \[ \sigma_1^2\sigma_2^2-\sigma_{12}^2\geq 0. \] When both standard deviations are positive, this is equivalent to \(|\rho_{12}|\leq 1\). A zero variance requires special care: a variable with zero variance is constant, so its covariance with any other variable must also be zero.
For larger matrices, checking every pairwise correlation is necessary but not sufficient. The matrix must be positive semidefinite as a whole. One standard equivalent test for a symmetric matrix is that every principal minor is nonnegative. In practice, a numerical matrix routine can test positive semidefiniteness, but the basic checks in this tutorial often reveal the source of a problem first.
Why These Conditions Hold
The conditions are consequences of the definitions, not arbitrary conventions. For any vector \(w\), the portfolio return is a weighted sum of the asset returns. Its variance cannot be negative. Expanding that variance gives the quadratic form in the covariance matrix.
The expansion uses the covariance definition and the fact that variance is nonnegative. It also explains symmetry: \(\operatorname{Cov}(R_i,R_j)=\operatorname{Cov}(R_j,R_i)\), so the entries on opposite sides of the diagonal must match. Setting a weight vector to hold only asset \(i\) shows why \(\sigma_{ii}\), the variance of that return, cannot be negative.
For two assets, take \(w=(1,t)^\mathsf{T}\). The variance is \(\sigma_1^2+2t\sigma_{12}+t^2\sigma_2^2\), which must be nonnegative for every real \(t\). If both variances are positive, this quadratic cannot have two distinct real roots; its discriminant must therefore be nonpositive:
Dividing by \(\sigma_1^2\sigma_2^2\) gives \(\rho_{12}^2\leq 1\), the familiar correlation bound. This argument also shows why an invalid covariance matrix can produce a negative variance for some weight vector.
Worked Example: Validating a Three-Asset Matrix
A hypothetical analyst records annual decimal returns for three assets. The proposed covariance matrix is \[ \Sigma= \begin{pmatrix} 0.04&0.03&-0.02\\ 0.03&0.09&0.06\\ -0.02&0.06&0.16 \end{pmatrix}. \] Determine whether the matrix passes the basic validity checks. All entries are in squared annual decimal-return units.
Method. Check symmetry and the diagonal first, then calculate the implied correlations and principal minors. This avoids treating plausible-looking covariance entries as valid without checking whether they can coexist.
Step 1: Symmetry and diagonal. The entries above and below the diagonal match: \(0.03=0.03\), \(-0.02=-0.02\), and \(0.06=0.06\). The diagonal variances are \(0.04\), \(0.09\), and \(0.16\), all nonnegative. The corresponding standard deviations are \(\sqrt{0.04}=0.20\), \(\sqrt{0.09}=0.30\), and \(\sqrt{0.16}=0.40\).
Step 2: Implied correlations. Divide each covariance by the product of the relevant standard deviations:
All three correlations are between \(-1\) and \(1\). This is a necessary check, but for three assets it does not by itself establish that the whole matrix is valid.
Step 3: Check the principal minors. The one-by-one principal minors are the positive diagonal entries. The three two-by-two principal minors are \[ (0.04)(0.09)-(0.03)^2=0.0036-0.0009=0.0027, \] \[ (0.04)(0.16)-(-0.02)^2=0.0064-0.0004=0.0060, \] and \[ (0.09)(0.16)-(0.06)^2=0.0144-0.0036=0.0108. \] The full determinant is \[ \begin{aligned} \det(\Sigma) &=0.04[(0.09)(0.16)-(0.06)^2]\\ &\quad-0.03[(0.03)(0.16)-(0.06)(-0.02)]\\ &\quad+(-0.02)[(0.03)(0.06)-(0.09)(-0.02)]\\ &=0.04(0.0108)-0.03(0.0060)-0.02(0.0036)\\ &=0.000432-0.000180-0.000072\\ &=0.000180. \end{aligned} \] All principal minors are nonnegative, so this symmetric matrix is positive semidefinite. It passes the matrix-validity checks.
Check and trap avoided. The entries are not all positive, but a negative covariance is allowed; it represents returns that tend to move in opposite directions. The relevant test is not whether every entry is positive. It is whether the matrix satisfies the required conditions, including positive semidefiniteness.
Diagnosing Inconsistencies
A failed check identifies a problem but usually does not identify its exact source. For example, an impossible correlation could result from an incorrect covariance, an incorrect variance, a percentage-versus-decimal mismatch, or values drawn from different measurement periods. Do not silently replace a suspicious entry with a convenient value. Check the source data and the stated units before revising anything.
Worked Example: An Impossible Covariance
A two-asset matrix lists annual decimal-return variances of \(0.04\) and \(0.09\), with covariance \(0.075\): \[ \Sigma= \begin{pmatrix} 0.04&0.075\\ 0.075&0.09 \end{pmatrix}. \] Check the matrix and explain why a portfolio calculation can reveal the problem.
Method. First calculate the implied correlation and determinant. Then test a weight vector that exposes the negative direction. This is a diagnostic calculation, not a method for guessing a replacement covariance.
Step 1: Implied correlation. The standard deviations are \(\sqrt{0.04}=0.20\) and \(\sqrt{0.09}=0.30\), so \[ \rho_{12}=\frac{0.075}{(0.20)(0.30)}=\frac{0.075}{0.06}=1.25. \] A correlation of \(1.25\) is impossible.
Step 2: Matrix test. The determinant is \[ (0.04)(0.09)-(0.075)^2=0.0036-0.005625=-0.002025. \] Because this principal minor is negative, the matrix is not positive semidefinite.
Step 3: Exhibit an impossible variance. Consider weights \(w=(3,-2)^\mathsf{T}\). Short positions are allowed for this diagnostic even though the weights sum to one. The implied variance is \[ \begin{aligned} w^\mathsf{T}\Sigma w &=3^2(0.04)+(-2)^2(0.09)+2(3)(-2)(0.075)\\ &=0.36+0.36-0.90\\ &=-0.18. \end{aligned} \] A variance of \(-0.18\) is impossible. The result diagnoses inconsistent inputs; it is not a portfolio risk estimate.
Check and trap avoided. A long-only portfolio might still produce a positive number from these entries, but that would not make the matrix valid. Conversely, the calculations do not prove that the covariance should be \(0.06\), the largest value allowed by the stated standard deviations. The original data must be checked rather than “corrected” by assumption.
Unit errors can be less obvious because the numbers may remain symmetric and the diagonal may remain nonnegative. Remember that covariance units are squared return units. If returns are expressed in percentage points, converting a covariance to decimal-return units multiplies it by \(0.01^2=0.0001\). If the entries also refer to different periods—for example, monthly standard deviations paired with an annual covariance—the inputs must be reconciled before they are combined.
Worked Example: Reconciling Percentage-Point Units
A hypothetical risk report gives annual standard deviations of 12% and 20%, and a correlation of \(-0.25\). A spreadsheet contains a covariance of \(-60\) in percentage-point-squared units, while the rest of the calculation uses decimal returns. Convert the covariance, validate the two-asset inputs, and calculate the standard deviation of a portfolio invested 40% and 60% in the assets.
Method. Convert the covariance to decimal-return-squared units before using the matrix formula. This avoids mixing a percentage-point covariance with decimal variances.
Step 1: Convert the standard deviations and variances. The decimal standard deviations are \(0.12\) and \(0.20\). Therefore, the decimal variances are \[ (0.12)^2=0.0144,\qquad (0.20)^2=0.0400. \]
Step 2: Convert and verify the covariance. One percentage point is \(0.01\) in decimal-return units, so one percentage-point-squared is \(0.0001\) in decimal-return-squared units. Thus \[ -60(0.0001)=-0.0060. \] Check against the reported correlation: \[ \frac{-0.0060}{(0.12)(0.20)} =\frac{-0.0060}{0.0240} =-0.25. \] The converted covariance agrees with the stated correlation and lies within the allowable bounds.
Step 3: Calculate portfolio variance. With weights \(w_1=0.40\) and \(w_2=0.60\), the variance is \[ \begin{aligned} \operatorname{Var}(R_p) &=(0.40)^2(0.0144)+(0.60)^2(0.0400) +2(0.40)(0.60)(-0.0060)\\ &=0.16(0.0144)+0.36(0.0400)-0.48(0.0060)\\ &=0.002304+0.014400-0.002880\\ &=0.013824. \end{aligned} \] The portfolio standard deviation is \[ \sqrt{0.013824}=0.11758\ldots \] or **11.76%**, rounded to two decimal places.
Check and trap avoided. The covariance conversion reproduces the stated correlation, and the resulting variance is positive. Using \(-60\) directly beside decimal variances would mix scales and make the portfolio calculation meaningless. The weights sum to \(0.40+0.60=1.00\), as expected for the stated fully invested portfolio.
A Practical Review Sequence
When an answer seems implausible, work through the input checks in a fixed order rather than changing numbers until the result looks reasonable.
Verify that diagonal entries are variances, off-diagonal entries are covariances, and the row and column labels refer to the intended assets.
Match each off-diagonal pair. Negative covariance is allowed; mismatched values across the diagonal are not.
Check decimal returns versus percentage points, variance versus standard deviation, and monthly versus annual measurements.
For each pair with positive standard deviations, check that the implied correlation lies from \(-1\) to \(1\), inclusive.
For two assets, check the determinant condition. For more assets, use a positive-semidefinite test; pairwise checks alone are not enough.
A portfolio variance is a property of the entire joint input set, not just a sum of separate asset risks. A matrix can have a symmetric layout, positive diagonal entries, and individually plausible pairwise correlations yet still fail the whole-matrix test. Conversely, a negative covariance or a negative portfolio weight is not automatically an error. Check the mathematical conditions and the data definitions before interpreting the result.
Check Your Understanding
For each question, validate the relevant inputs before accepting a risk calculation.
- A two-asset annual decimal-return matrix has variances \(0.0225\) and \(0.0625\), and covariance \(0.015\). Find the implied correlation and determine whether the two-asset matrix passes the determinant check. (Answer: \(\rho=0.4000\); determinant \(0.00118125>0\), so it passes.)
- A proposed two-asset matrix has variances \(0.01\) and \(0.04\), and covariance \(0.025\). What is the implied correlation, and is the matrix valid? (Answer: \(\rho=1.2500\); no, it is invalid.)
- Two monthly decimal returns have standard deviations of 2% and 5%, with correlation \(-0.30\). Find their covariance in monthly decimal-return-squared units. (Answer: \(-0.000300\).)
- A three-asset correlation matrix has ones on its diagonal and off-diagonal correlations \(\rho_{12}=0.8\), \(\rho_{13}=0.8\), and \(\rho_{23}=-0.8\). Each pairwise correlation is within bounds. Use the determinant to decide whether the matrix is valid. (Answer: determinant \(1+2(0.8)(0.8)(-0.8)-(0.8^2+0.8^2+(-0.8)^2)=-1.944\); invalid.)
- Two assets have annual decimal standard deviations of 10% and 20%, with correlation \(0.25\). For portfolio weights \(0.60\) and \(0.40\), calculate the portfolio variance and standard deviation. (Answer: variance \(0.0124\); standard deviation \(0.1114\), or \(11.14\%\) to two decimal places.)