Important: Starting with 1.0.0, the next version, it will be renamed as: lower case ‘esgtoolkit’ (to finally remove all my active packages from CRAN)

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 R universe:
# Enable universe(s) by techtonique
options(repos = c(
  techtonique = 'https://techtonique.r-universe.dev',
  CRAN = 'https://cloud.r-project.org'))

# Install some packages
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.