A framework for historical volatility estimation and analysis.
This script calculates and analyses the following historical volatility estimators:
Close-to-Close
estimator (and a variant of it that uses demeaned returns);Parkinson
estimator (1980);Garman-Klass
estimator (1980) and a variant proposed by Yang & Zhang (2000);Rogers-Satchell
estimator (1991);Hodges-Tompkins
estimator (2002);Yang-Zhang
estimator (2000);Meilijson
estimator (2009).The minimum Matlab version required is R2014a
. In addition, the following products and toolboxes must be installed in order to properly execute the script:
run.m
script following your needs.run.m
script.Datasets can be fetched from Yahoo! Finance
using the function fetch_data
, or parsed from Excel
sheets using the function parse_dataset
. The example script provides a good overview of both approaches.
Every dataset passed as input argument to analyze_volatility
, compare_estimators
and estimate_volatility
functions must be structured as a table of historical time series having the following columns: