0
$\begingroup$

I am trying to simulate the following process:

h(t)=B(t)+e[P1(t)-P2(t)]

in which B(t) is a Brownian motion and P1, P2 are Poisson process with lambda=5000 and t<-1:10000 and I choose e=0.5. I am able to simulate B(t) wiht the following code:

x <- rnorm(n = length(t) - 1, sd = sqrt(0.01)) 
B <- c(0, cumsum(x))

and one Poisson process

P1<-cumsum(rpois(10000,5000/10000))

P2 is also poisson process with the same rate so that the difference between P1 and P2 will be a process that jumps around 0 as follow: ...0,lambda,-2*lambda,lambda,0.... I created P2 the same way I did for P1 and plot the difference P1-P2 but the result is not as I expected

I wonder if my algorithm to create P1 and P2 is correct? Can someone please tell me the step that I went wrong?

Many thanks in advance

$\endgroup$
2
  • $\begingroup$ Why do you think P1 - P2 will behave like that? Your sample looks deterministic, but P1 - P2 will be random. $\endgroup$ Commented Dec 8, 2014 at 4:58
  • $\begingroup$ sorry, this is my clarification for how I expected the difference P1-P2 behave: since the jump of Poisson process is 1, the difference of 2 Poisson processes should evolve around 0 with the jump of either 1 or -1. Therefore, h(t) will have the jump of 0.5 or -0.5 when the difference is not 0 $\endgroup$
    – Ocean
    Commented Dec 8, 2014 at 19:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.