Skip to content

v0.5.0

Compare
Choose a tag to compare
@thierrymoudiki thierrymoudiki released this 06 Aug 16:40
· 33 commits to master since this release
0a75fe2

See https://techtonique.github.io/ESGtoolkit/news/ for more details on releases. Or (if you're a habitual user), just try this:

devtools::install_github("Techtonique/ESGtoolkit")

# GBM log returns (haha) with starting date 

# 1 - Simulation -----

eps0 <- ESGtoolkit::simshocks(n = 100, horizon = 5, frequency = "quart", start = c(1995, 1))
sim.GBM <- ESGtoolkit::simdiff(n = 100, horizon = 5, frequency = "quart",   
               model = "GBM", 
               x0 = 100, theta1 = 0.03, theta2 = 0.1, 
               eps = eps0, start = c(1995, 1))
log_returns_GBM <-  ESGtoolkit::calculatereturns(sim.GBM, type="log")  

# 2 - Plot simulations -----

par(mfrow=c(1, 2))
ESGtoolkit::esgplotbands(log_returns_GBM , xlab = "time", ylab = "values", main = "with esgplotbands")
matplot(as.vector(time(log_returns_GBM)), log_returns_GBM, type = 'l', 
main = "with matplot", xlab = "time")