# MetaStock Standard Deviation Function

Provided By www.meta-formula.com

Standard Deviation is simply a statistical measure of volatility. It measures how widely values (e.g. closing prices) are spread from the average (e.g. mean closing price). The more dispersed the data is, the higher the `deviation' and the higher the volatility. The lower the deviation, the lower the volatility.

Often, standard deviation is used to calculate indicators such as Bollinger Bands. It's often used when trading derivatives, since it provides a good indication of a security's volatility, which greatly affects the pricing of derivatives.

CALCULATION

Standard Deviation is derived by firstly calculating a simple moving average of the selected data array (eg., the closing price or an indicator), and summing the squares of the difference between the data array and its moving average. This value is then divided by the number of periods over which it is calculated. Finally, the square root of this result is calculated. Fortunately, MetaStock does all the hard work for us.

SYNTAX Stdev(Data Array, Periods)

Data Array _ This is the data array used to determine the standard deviation.

Periods _ This specifies how many periods are used to determine the standard deviation of the data array.

EXAMPLE

Here is an example using the Standard Deviation:

Stdev(C,20)

In the above example:

Data Array = C

Periods = 20

APPLICATION

A more useful application of this example could be:

Stdev(C,20)<1.05*Lowest(Stdev(C,20))

This formula checks that the present value of the 20 period standard deviation of the close, is within 5 percent of its all time low. This identifies securities with low volatility.