# Standard Deviation

## Overview

Standard deviation statistically measures the difference between the closing prices and the average prices over a number of time periods. It is a good indicator of the volatility of the target exchange rate: the higher the standard deviation, the higher the volatility.

## Formula

First calculate the average mid-price over the last n time periods:

MAn = (MP(t) + MP(t-1) + ... + MP(t-n+1) ) / n

where MP(t) is the mid-price of the latest period, and n is the number of periods considered.

Then, the standard deviation can be calculated as follows:

Std.Dev. = Sqrt( ( (CP(t))^2 + (CP(t-1))^2 + ... + (CP(t-n+1))^2 ) / n )

where CP(t) is the closing price of the latest period, "Sqrt" is the square root, and "^2" means "to the power of two".

## Parameters

The standard deviation calculation has one parameter, namely n, specifying the number of periods to include in the calculation.

## Interpretation

When the standard deviation peaks, this is often interpreted as a signal that the rates will change direction: on a high peak, the rates are expected to go down and on a low peak, the rates are expected to go up.