File Exchange

image thumbnail

Historical Value At Risk

version (11.4 KB) by David Willingham
Calculates Historical Value at Risk for a given portfolio of returns


Updated 01 Sep 2016

View Version History

View License

Calculates Historical Value at Risk for a given portfolio of returns.

confidence_level = 0.95;
plot_flag = true;
VAR_hist = computeHistoricalVaR(returns,confidence_level,plot_flag)

Cite As

David Willingham (2021). Historical Value At Risk (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Shan C.

Is it possible to get a modified version for Relative VaR (relative to S&P500 for example)?

Shan C.

Sascha Zühlke

Alberto Belasti

Competent author.
thanks for this nice contribution.

Yeon Kyo Chi

gowent gowent

Thank you very much!!

Zhang Shumeng

Thank you!

Chen Chen

Hi, thanks for the contribution. I have one question about the plotting of historical VaR. Since we don't use a normal fit here, it is obviously unreasonable that the y-axis still shows the normal fit number, how can I make y-axis the frequency of the data?

Taylor Xie

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!