Discretized quadratic variation of a stochastic process
QuadraticVariation(X)
A numeric vector, same length as X, giving the discretized quadratic variation as a function of time
## Quadratic Variation of Brownian motion
times <- seq(0,10,0.01)
B <- rBM(times)
plot(times,QuadraticVariation(B))
## Quadratic Variation of an Ito integral
G <- cos(B)
X <- itointegral(G,B)
plot(times,QuadraticVariation(X))
lines(times,itointegral(G^2,times))