1

I am am trying to calculate VaR using the Historical Simulation method for the S&P500. I used the PerformanceAnalytics package with

VaR(P1[1:1000], p =0.95, method = "historical")

but I get an error message as below:

VaR calculation produces unreliable result (risk over 100%) for column: 1 : -1.68435909175

The data that I have used is log returns calculated as =LN(Today's close/Yesterday's close)*100 and when I calculate the VaR using the percentile function(PERCENTILE(B2:B1001,0.05)), I get the value of -1.684 as above. I understand that the package was written with returns in mind but I am not sure if I have conceptually made a mistake with my calculation or the error is due to me using log returns.

In this case, would it be better to use normal returns over log returns?

B--rian
  • 5,578
  • 10
  • 38
  • 89
user134919
  • 11
  • 1
  • 2
  • 1
    I don't know the package, but I would assume that if you feed log returns into the function, you get the VaR back as a log return. Which means that `-1.684` is the 5th percentile log return. If you want to turn it into a normal return, exponentiate it. – mrip Jun 03 '16 at 20:17

1 Answers1

0

Apparently VaRuses decimal returns not percentage. See the same message when passing a percentage return to that function. Or use quantile.

> data(edhec)
> VaR(edhec[,1], p=.95, method="historical")
    Convertible Arbitrage
VaR              -0.01916
> quantile(edhec[,1],c(.05,.95))
      5%      95% 
-0.01916  0.02679 
> VaR(edhec[,1]*100, p=.95, method="historical")
VaR calculation produces unreliable result (risk over 100%) for column: 1 : 1.916
    Convertible Arbitrage
VaR                    -1
> quantile(edhec[,1]*100,c(.05,.95))
    5%    95% 
-1.916  2.679 
Robert
  • 5,038
  • 1
  • 25
  • 43