Adaptive MultilevelSplitting (AMS) simulation tools for rare-event option pricing and pathgeneration in continuous-time models.
Core routines are implemented inC++(Rcpp/RcppArmadillo) for speed.
Status: under active development; preparing for CRANsubmission.
Install the development version from GitHub:
install.packages(“remotes”)remotes::install_github(“RiccardoGozzo/amsSim”)
devtools::install_github(“RiccardoGozzo/amsSim”)
pak::pak(“RiccardoGozzo/amsSim”)
library(amsSim)
set.seed(1) res <- simulate_AMS(1, n = 500, t = 1, p = 252, r =0.03, sigma = 0.2, S0 = 1, rho = NULL) str(res)
set.seed(1) out <- AMS(model = 2, type = 3, funz = 1, n = 500, t =1, p = 252, r = 0.03, sigma = 0.2, rho = -0.5, S0 = 1, rim = 0, Lmax =0.5, strike = 1.3, K = 200) str(out)
Returns simulated paths: model 1 (Black–Scholes): matrix/list with Sof size n x (p - rim + 1) Heston models (2–4): list with S, V
Runs the adaptive splitting loop and returns list(price, std).
Contributions are welcome!
If you wish to contribute, please:
This package is released under theMITLicense.
See the fileLICENSE for details.
If you useamsSim in your research, please cite itas follows:
Gozzo, R. (2025). Adaptive Multilevel Splitting: First Application toRare-Event Derivative Pricing Available at:https://arxiv.org/html/2510.23461v1