This calculates a standard deviation for a series between two dates, or a moving standard deviation over a time period. SDN# uses N (the number of values) as the divisor to calculate the degree to which individual values in a sequence vary from the mean (average) of all values in that series. The lower the standard deviation, the less individual values vary from the mean.A parameter N can be used to return N/A if there are any missing values in the data sample. The formula used in the calculation is:
Where is the mean of the values.
The SDN# function has both static and moving formats:
SDN#(Expression,Start Date,End Date)
This calculates a single standard deviation value between the Start Date and End Date . Actual dates are typed in using either the standard DD/MM/YY format, or the displacement date formats. As a date parameter one can also use YRE, HFE, QTE, MTE, WKE, LYE, BDATE, BDATEXXF. It is also possible to use MIN and MAX here.
SDN#(Expression)
If you do not specify start and end dates, the defaults are the start and end dates for the display period.
SDN#(Expression,Period)
This moving format calculates a moving standard deviation over the period specified between the start and end dates of the display period. Use the period codes to specify the period.
SDN#(Expression,Period,Parameter)
The parameter set to N can be used to return N/A if there are any missing values in the data sample.
SDN#(FTALLSH,01/01/99,31/3/99)
This static format calculates the standard deviation of the FT All Share Index for the first quarter of 1999.
SDN#(UKPRSAVRE,5Y)
This moving format calculates the standard deviation of the UK personal savings ratio over a moving 5 year period, indicating the degree of volatility of the ratio.
SDN#(PCH#(AIE,1D),783D,N)
This calculates a rolling standard deviation but only shows valid values when there are about three years of daily returns in the data sample..
You must use a standard deviation period that is consistent with the frequency of the stored data. That is, the Period frequency you request for the function can be greater but not less than the data frequency. For example:
SDN#(UKBCJD..,30D)
A daily time period is invalid for the UK unemployment series because the frequency of the data is monthly.