StandardDevAnnual (Function)

image\trumpet2.gif Disclaimer

The StandardDevAnnual function calculates a standard deviation of values, and presents an annualized number.

Syntax

StandardDevAnnual(Price, Length, DataType)

Returns (Double)

A numeric value containing the annualized Standard Deviation.

Parameters

Name

Type

Description

Price

Numeric

Specifies which bar value (price, function, or formula) to be considered.

Length

Numeric

Sets the number of bars to be considered.

DataType

Numeric

1 = population, 2 = sample

Remarks

The standard deviation is derived by first finding the variance and then taking its square root:

StdDev = image\standarddev_formula.gif

…where

N is the number of elements

D is the individual elements in the sample

M is the sample mean

This function then multiplies the standard deviation by BarAnnualization in order to generate an annualized value.

Example

Assigns to Value1 the annualized standard deviation of the Close over a sample of 21 bars.

Value1 = StandardDevAnnual(Close, 21, 2);