Treasury Practice

How to calculate standard deviation

Published: Oct 2001

What is a standard deviation?

A standard deviation provides a measure of the variability of a set of data. In the article on Value-at-Risk, we considered a portfolio of three assets, whose value varies from one observation period to another. In the article, we accepted measurements of both the standard deviation of all the assets and the correlation between them. This article shows how the standard deviations were calculated from the raw (or observed) data.

Over the previous ten observation periods, the value of the three assets increased by the proportions shown in Table 1.

Table 1

Observation Asset 1 Asset 2 Asset 3
1 14% 21% 4%
2 12% 19% 9%
3 10% 17% 12%
4 11% 15% 17%
5 13% 13% 15%
6 10% 9% 13%
7 9% 11% 11%
8 8% 8% 10%
9 9% 5% 11%
10 10% 2% 10%
Mean 10.6% 12% 11.2%

The mean return is calculated by adding all the observed returns together and dividing the total by the number of observations (in this case 10). However, whilst the mean measures the average movement over the time period, it does not give any indication of the range of observations. This can be seen by contrasting the observations of Asset 1 and Asset 2. Asset 1 ranges from 8% to 14%, whereas Asset 2 ranges from 2% to 21% – however the means are only 10.6% and 12% respectively. Standard deviation gives a much clearer view of the volatility of the two assets.

To calculate the standard deviation, use the following formula:
\( S.D. = v\:?\frac{x \: -\:  \mu^2}{n\:-\:1}\)

Where:

  • ? = Sum of
  • x = an observation in the series
  • μ = mean
  • n = number of observations.

In words, for each observation, we calculate the difference between that observation and the mean, and square it. All these squared differences are then added together and then divided by the number of observations minus one. The square root of this figure is the standard deviation.

To calculate standard deviation for Asset 1

\( First \:  calculate \: \mathord{?} \: \chi\:-\: \:  \mu^2\)
Observation Asset 1 Mean Difference Difference2
1 14% 10.6% 3.4% 11.56%
2 12% 10.6% 1.4% 1.96%
3 10% 10.6% 0.6% 0.36%
4 11% 10.6% 0.4% 0.16%
5 13% 10.6% 2.4% 5.76%
6 10% 10.6% 0.6% 0.36%
7 9% 10.6% 1.6% 2.56%
8 8% 10.6% 2.6% 6.76%
9 9% 10.6% 1.6% 2.56%
10 10% 10.6% 0.6% 0.36%
Total (?(x-μ)2 32.40%

\( Then \: S.D. = v\frac{32.4}{10\:-\: 1} \: =\: \frac{32.4}{9} \: =\: 1.8974\% \)

Using the same formula, the S.D. for Asset 2 is 6.146% and for Asset 3 is 3.521%. Returning to our earlier point, the difference in the standard deviations between assets 1 and 2 gives us a much clearer indication as to the respective spreads of the observations detailed above.

If you use an Excel spreadsheet to record your data, you can use the STDEV formula to calculate the standard deviation. Assume the observations on Asset 1 are in column A, rows 1 to 10, in an Excel spreadsheet. To calculate the standard deviation, you would enter the following formula into a different square:

=STDEV A 1 : A 10

This would give the answer 0.018974 or 1.8974%.

All our content is free, just register below

As we move to a new and improved digital platform all users need to create a new account. This is very simple and should only take a moment.

Already have an account? Sign In

Already a member? Sign In

This website uses cookies and asks for your personal data to enhance your browsing experience.