library(repr)
options(repr.plot.width=8, repr.plot.height=4)
options(repr.matrix.max.rows=600, repr.matrix.max.cols=400)
15 Simulated VaR with simple and continuous returns
15.1 Simulated VaR with simple and continuous returns
When working with simulations, we can choose if we want to use simple or continuous returns to simulate future prices.
15.1.1 Simple returns
If we want to work with simple returns, we calculate one-day future prices in the following way:
- Simulate one-day return: \(R_{t+1} \sim \mathcal{N}(0,\sigma^2)\)
- Calculate one-day future price: \(P_{t+1} = P_t \times (1+R_{t+1})\)
15.1.2 Continuous returns
If we want to work with continuous returns, we calculate one-day future prices in the following way:
- Simulate one-day return: \(y_{t+1} \sim \mathcal{N}(0,\sigma^2)\)
- Calculate one-day future price: \(P_{t+1} = P_t e^{r(1/365)} \times e^{y_{t+1}} \times e^{-0.5\sigma^2}\)
15.1.3 Comparison for VaR 5%
# Simple returns
= 0.05
p = 1e5
S = 100
P = 0.01
sigma = rnorm(S, 0, sigma^2)
ret = P*(1+ret)
Psim_simple
# VaR 5%
= sort(Psim_simple - P)
Ps_simple *S] Ps_simple[p
-0.0164945720378853
# Compound returns
= 0.03 # Assuming risk free rate
r = P*exp(r*(1/365))*exp(ret)*exp(-0.5*sigma^2)
Psim_comp # VaR 5%
= sort(Psim_comp - P)
Ps_comp *S] Ps_comp[p
-0.0132745128142631