What this calculator shows
Paste two to six return series in percent, one column per series and one row per period, with an optional header row of names. Every series needs the same number of periods, from 3 to 600. The calculator returns the Pearson correlation for every pair, the covariance matrix and each series' sample standard deviation. If you enter weights that add up to 100%, it also returns the portfolio's standard deviation and its diversification ratio. It has no market data: every number is one you type in.
How the numbers are worked out
- Covariance multiplies each pair's gaps from their means, sums them and divides by n − 1 (the sample version).
- Correlation = covariance ÷ (standard deviation × standard deviation), so it always lies between −1 and 1. A series that never varies has a standard deviation of 0, and its correlations are shown as "n/a".
- Portfolio variance is w′Σw: every pair of weights times their covariance, summed. It is per period, like the returns, and the portfolio standard deviation is its square root.
- The annualised figure multiplies by √(periods a year), an approximation that assumes independent periods.
- The diversification ratio divides the weighted average of the standard deviations by the portfolio standard deviation. A ratio of 1 means combining the series removed none of the ups and downs in this sample.
Worked example (hypothetical)
The defaults are three made-up series of 12 monthly returns, each with a mean of 1%. Series A and B have a correlation of about 0.82, A and C about −0.69, and B and C about −0.93. With weights of 50%, 30% and 20%, the portfolio variance is 11.24 ÷ 11, about 1.0218, so the standard deviation is about 1.0109% a month. The weighted average standard deviation is about 1.4410%, which gives a diversification ratio of about 1.4255.
Limits of this model
- Correlation only captures straight-line co-movement, and it changes over time. In past sharp market declines, correlations between many risky assets have often risen just when spreading out mattered most.
- Short samples and single extreme periods can move a correlation a lot, so the notes show the sample size. Background is in risk and diversification, asset allocation basics and drawdown and concentration. For return per unit of volatility, see the Sharpe and Sortino calculator.
- This is education, not a recommendation about any security.
For educational purposes only. This material does not provide investment advice.