Info

This question is closed. Reopen it to edit or answer.

What am I missing in my HS VaR code?

2 views (last 30 days)
Michiel
Michiel on 28 Mar 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
I have to calculate the value at risk with the help of the historical simulation approach, over some past returns. I used the following code up to now:
VaR_HS.hist_86_95=quantile(sorted_return_86,0.95);
but my mentor told me that I am missing a 3th number in my code. I think he means the dim, because I found on internet that you can calculate the Historical Value at Risk with VaR_HS.hist_86_95=quantile(x,p,dim); but how do I determine this dim value? My returns consist of 1 column and 61 rows. Or is this not the 3th value that my mentor referred to? Please can someone help me?
Thanks in advance
sincerely,
Michiel

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!