image thumbnail

Historical Volatility

version 1.5.0 (497 KB) by Tommaso Belluzzo
A framework for historical volatility estimation and analysis.


Updated 14 Jun 2020

From GitHub

View license on GitHub


This script calculates and analyses the following historical volatility estimators:

> the traditional Close-to-Close estimator (and a variant of it that uses demeaned returns);
> the Parkinson estimator (1980);
> the Garman-Klass estimator (1980) and a variant proposed by Yang & Zhang (2000);
> the Rogers-Satchell estimator (1991);
> the Hodges-Tompkins estimator (2002);
> the Yang-Zhang estimator (2000);
> the Meilijson estimator (2009).


1) Edit the "run.m" script following your needs.
2) Execute the "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:

> Date (numeric observation dates)
> Open (opening prices)
> High (highest prices)
> Low (lowest prices)
> Close (closing prices)
> Return (log returns)

Cite As

Tommaso Belluzzo (2021). Historical Volatility (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with R2014b to R2020a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.