Standard deviation is measured from the annualised projected returns across the 1000 scenarios over 10 years.
We calculate this as follows:
First, we produce an array of annual returns for that particular portfolio using the portfolio asset allocations and the appropriate different returns files. The annual portfolio returns are produced for each year from term 0 to end of the forecasted investment term, and for each of the 1,000 scenarios. So for a term of 20 years, say, this would result in an array of numbers of size 1,000 x 20.
We then take the mean of this array, which gives us the Gross Annual Mean Return (GAMR).
Next, we produce a new array of numbers of equal size to the returns array in the first step. The values in this new array are taken as the square of the initial portfolio annual return (from the first array) less the GARM.
So NEWx,y = (RETURNx,y - GARM) ^ 2, where NEWx,y is the entry in the new array for scenario x and term y, and RETURNx,y is the entry in the original returns array for scenario x and term y.
The Standard Deviation is then calculated as the square root of the mean of this new array of values.