GT::Indicators::StandardError

Overview

Standard Error is a statistical measure of volatility. Standard Error is typically used as a component of other indicators, rather than as a stand-alone indicator. For example, Kirshenbaum Bands are calculated by adding a security's Standard Error to an exponential moving average.

Calculation

Calculate the L-Period linear regression line, using today's Close as the endpoint of the line. Note : The term "linear regression" is the same as "least squares" or "best fit" line in some textbooks.

Calculate d1, d2, d3, ..., dL as the distance from the line to the Close of each bar which was used to derive the line. That is, d(i) = Distance from Regression Line to each bar's Close.

Average of squared errors (AE) = (d1˛ + d2˛ + d3˛ + ... + dL˛) / L Standard Error = Square Root of AE