Ito integral of a stochastic process w.r.t. another

itointegral(G, B)

Arguments

G

numeric vector containing the integrator

B

numeric vector, same length as G, containing the integrand

Value

A numeric vector, same length as G, giving the "running integral", i.e. the Ito integral as a function of the upper limit.

Examples

## Integration of Brownian motion w.r.t. itself
times <- seq(0,10,0.01)
BM <- rBM(times)
I <- itointegral(BM,BM)
matplot(times,cbind(I,0.5*BM^2-0.5*times),type="l",xlab="Time",ylab="Ito integral",
         main="Integral of B.M. w.r.t itself")