Dear all
I want to simulate a stochastic jump variance process in which N is
Bernoulli (Poisson approximation) with intensity lambda0 + lambda1*Vt.
lambda0 is constant and lambda1 can be interpreted as a regression
coefficient on the current variance level Vt. J is the scaling factor
How can I rewrite this avoiding the loop structure which is very
time-consuming for long simulations?
for (i in 1:N){
...
N <- rbinom(n=1, size=1, prob=(lambda0+lambda1*Vt))
Vt <- ... + J*N
..
}
P.S. This is going towards the Duffie, Pan, Singleton 2000 Transform
Pricing
paper, here stochastic volatility with state-dependent correlated
jumps
(Eraker 2004).
Thanks a lot in advance.
[[alternative HTML version deleted]]