A toolkit for Monte Carlo Simulations in Finance, Economics, Insurance, Physics. Multiple simulation models can be created by combining building blocks provided in the package.
In addition to the example below, you can read:
library(ESGtoolkit) # Geometric Brownian Motion (https://en.wikipedia.org/wiki/Geometric_Brownian_motion) eps0 <- simshocks(n = 100, horizon = 5, frequency = "quart") sim.GBM <- simdiff(n = 100, horizon = 5, frequency = "quart", model = "GBM", x0 = 100, theta1 = 0.03, theta2 = 0.1, eps = eps0) esgplotbands(sim.GBM, xlab = "time", ylab = "values", main = "with esgplotbands") matplot(as.vector(time(sim.GBM)), sim.GBM, type = 'l', main = "with matplot")
Your contributions are welcome, and valuable. Please, make sure to read the Code of Conduct first.
If you’re not comfortable with Git/Version Control yet, please use this form.
BSD 3-Clause Clear © Thierry Moudiki, 2014.