Computing VaR for weekly losses
In this final exercise, you will test your understanding by computing an empirical estimate of VaR for weekly losses in the returns
data. You will have to repeat the analysis of the previous exercise, but this time, you need to:
- Find the weekly log-returns of
returns
usingapply.weekly()
. - Use these weekly log-returns to simulate the losses of the two risk factors through
lossop()
.
Note that the lossop()
function has been adjusted in your workspace so that it correctly calculates the losses and gains of the option portfolio for a one-week time horizon. It still takes in arguments as follows:
lossop(xseries, S, sigma)
Your challenge is to compute the 99% VaR for weekly changes in value of the European call option in returns
when the current stock price is S = 120
and the current volatility is sigma = 0.25
. What is the correct answer?
This exercise is part of the course
Quantitative Risk Management in R
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
