Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Volatility Historical
Technical Studies Reference
- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)
Volatility - Historical
This study calculates and displays the Historical Volatility for the data specified by the Input Data Input.
Let \(X\) be a random variable denoting the Input Data Input. Then we denote the Logarithmic Return of the Input Data at Index \(t\) as \(LR_t(X)\), and we compute it for \(t > 0\) as follows.
\(LR_t(X) = \displaystyle{\ln\left(\frac{X_t}{X_{t - 1}}\right)}\)Let \(LR(X)\) be a random variable denoting the Logarithmic Return of the Input Data, and let the Length and Number of Bars per Year Inputs be denoted as \(n\) and \(N\), respectively. Then we denote the Volatility - Historical at Index \(t\) for the given Inputs as \(HVol_t(X,n,N)\), and we compute it in terms of a Simple Moving Average for \(t \geq n\) as follows.
\(HVol_t(X,n,N) = 100\displaystyle{\sqrt{N}\sqrt{\frac{1}{n - 1} \sum_{i = \max\{0,t-n+1\}}^t \left(LR_i(X) - SMA_t(LR(X),n)\right)^2}}\)For an explanation of the Sigma (\(\Sigma\)) notation for summation, refer to our description here.
Inputs
- Input Data
- Length
- Number of Bars per Year: In order for this study to calculate historical volatility correctly, it is necessary for you to enter the number of bars in your chart that make up a one-year time period.
Spreadsheet
The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.
Open it through File >> Open Spreadsheet.
*Last modified Monday, 03rd October, 2022.