LeopoldoCatania/GAS

BacktestVaR not valid for different quantiles

Opened this issue · 1 comments

Dear Leopoldo Catania
I hope you are well.
I am using your package GAS to backtest VaR and ES estimates and I am running into the error below:
"Error in [.default(n, 2, 2) : subscript out of bounds".
This error occurs at the line where I run the BacktestVaR function. Please find attached the code (comments inside) and data used.

After several attempts and experimentation I realised the error stems from the quantile I choose for the VaR estimation (for instance 0.05 works while 0.01 does not work). In my work I am estimating VaR and ES for quantiles = [0.005, 0.001, 0.01, 0.05, 0.95, 0.99, 0.99] and I would like that the backtest works for all these quantiles.

Could this be a bug in the package/function?
Is there a way for you to help fix this error?

I would be glad to hear back from you.
Thank you.

Files are given below:
pola.txt

VaRES_cc_fmkl-gld_Ask.txt

Hello ! Did you find the solution ? I have the same problem