osp.fixed.design: Generic dynamic emulation of OSP with a non-sequential design

View source: R/ospProbDesign.R

osp.fixed.designR Documentation

Generic dynamic emulation of OSP with a non-sequential design

Description

RMC based on a batched non-adaptive design with a variety of regression methods

Usage

osp.fixed.design(
  model,
  input.domain = NULL,
  method = "km",
  inTheMoney.thresh = 0,
  stop.freq = model$dt
)

Arguments

model

a list containing all the model parameters, see Details.

input.domain

the domain of the emulator. Several options are available. Default in NULL All the empirical domains rely on pilot paths generated using pilot.nsims>0 model parameter.

  • NULL will use an empirical probabilistic design based on the pilot paths (default);

  • if a vector of length 2*model$dim then specifies the bounding rectangle

  • a single positive number, then build a bounding rectangle based on the \alpha-quantile of the pilot paths

  • a single negative number, then build a bounding rectangle based on the full range of the pilot paths

  • a vector specifies the precise design, used as-is (overrides design size)

method

regression method to use (defaults to km)

  • km: Gaussian process with fixed hyperparams uses DiceKriging via km (default) Must provide km.cov (vector of lengthscales) and km.var (process variance)

  • trainkm: GP w/trained hyperparams: uses DiceKriging via km

  • mlegp Local approximate GP from the laGP. Requires

  • homgp Homoskedastic GP: use hetGP with mleHomGP

  • hetgp Heteroskedastic GP: use hetGP with mleHetGP

  • spline: Smoothing Splines, use smooth.spline (only supported in 1D). Requires number of knots via model$nk

  • cvspline: Cross-validated Smoothing Splines, use smooth.spline (only supported in 1D). Number of knots chosen automatically via cross-validation.

  • loess: Local Regression: use loess with lo.span parameter (only in 1D or 2D)

  • rvm: Relevance Vector Machine: uses rvm from kernlab. Can optionally provide rvm.kernel parameter (default is 'rbfdot')

  • npreg: kernel regression using np package. Can optionally provide np.kertype (default is "gaussian"); np.regtype (default is Linear-constant "lc"); np.kerorder (default kernel order is 2) and np.bwtype (default bandwidth type is "fixed")

  • lm: linear model from stats

inTheMoney.thresh

which paths are kept, out-of-the-money is dropped. Defines threshold in terms of model$payoff.func

stop.freq

*experimental, currently disabled* frequency of stopping decisions (default is model$dt). Can be used to stop less frequently.

Details

The design can be replicated through batch.nrep model parameter. Replication allows to use nonparametric techniques which would be too expensive otherwise, in particular LOESS, GP and RVM. All designs are restricted to in-the-money region, see inTheMoney.thresh parameter (modify at your own risk) Thus, actual design size will be smaller than specified. By default, no forward evaluation is provided, i.e. the method only builds the emulators. Thus, to obtain an actual estimate of the option price combine with forward.sim.policy.

Value

a list containing:

  • fit a list containing all the models generated at each time-step. fit[[1]] is the emulator at t=\Delta t, the last one is fit[[M-1]] which is emulator for T-\Delta t.

  • timeElapsed: total running time based on Sys.time

Author(s)

Mike Ludkovski

Examples

set.seed(1)
model2d <- list(K=40,x0=rep(40,2),sigma=rep(0.2,2),r=0.06,div=0,
 T=1,dt=0.04,dim=2, sim.func=sim.gbm, payoff.func=put.payoff,pilot.nsims=1000,
 batch.nrep=100,kernel.family="matern5_2",N=400)

mludkov/mlOSP documentation built on April 29, 2023, 7:56 p.m.