if (FALSE) {
# model
gbm <- setModel(drift = 'mu*x', diffusion = 'sigma*x', solve.variable = 'x')
# settings
xinit <- 100
par <- list(mu = 0.01, sigma = 0.2)
sampling <- setSampling(Initial = 0, Terminal = 1, n = 1000)
# asymptotic expansion
approx <- ae(model = gbm, sampling = sampling, order = 4, true.parameter = par, xinit = xinit)
# expansion order max
aeSd(ae = approx)
# expansion order 1
aeSd(ae = approx, order = 1)
}
Run the code above in your browser using DataLab