Dear all

I want to simulate a stochastic jump variance process where N is Bernoulli
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 a 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]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to