Last Commit

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.

For more details, you can read the package vignette on ResearchGate. Functions’ documentation can be found in section ‘Reference’ of the website.

Installation

  • From Github:
library(devtools)
devtools::install_github("Techtonique/ESGtoolkit")
  • From CRAN:
install.packages("ESGtoolkit")

Quickstart

In addition to the example below, you can read:

  • this blog’s archives
  • the functions’ examples in section ‘Reference’ on the website contain code + a lot graphs
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")

Contributing

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.

License

BSD 3-Clause Clear © Thierry Moudiki, 2014.