Historical Volatility

Calculates the annualized historical volatility for a stock over the previous N trading days.
ダウンロード: 4.5K
更新 2010/10/15


This program calculates the annualized historical volatility for one or more stocks over a user-specified number of N trading days. The program uses daily closing prices in the calculations. If not specified, the program defaults to N=20 previous trading days.

The user may supply either a single ticker symbol or a cell array of ticker symbols. Using the supplied N, the program will then calculate the historical volatility for each stock.

In order to run the program, the function 'hist_stock_data.m' must be downloaded and stored in the same directory. This function may be found in my MathWorks File Exchange.


Josiah Renfree (2024). Historical Volatility (https://www.mathworks.com/matlabcentral/fileexchange/24811-historical-volatility), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R14SP1
Windows macOS Linux
Help Center および MATLAB AnswersFinancial Toolbox についてさらに検索

ヒントを得たファイル: hist_stock_data(start_date, end_date, varargin)

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート

Fixed error in date handling