swing.policy: Forward simulation of a swing payoff based on a sequence of...

View source: R/mlOSP_utils.R

swing.policyR Documentation

Forward simulation of a swing payoff based on a sequence of emulators

Description

Simulate \sum_k h(X_{tau_k}) using fit emulators

Usage

swing.policy(
  x,
  M,
  fit,
  model,
  offset = 1,
  use.qv = FALSE,
  n.swing = 1,
  verbose = FALSE
)

Arguments

x

a matrix of starting values (N x model$dim). If input x is a list, then use the grids specified by x

M

number of time steps to forward simulate

fit

a list of fitted emulators that determine the stopping classifiers to be used

model

List containing all model parameters. In particular uses model$dt,model$r for discounting and model$swing.payoff to compute payoffs

offset

deprecated

use.qv

experimental, do not use

n.swing

number of swing rights (integer, at least 1)

verbose

for debugging purposes

Details

Should be used in conjuction with the swing.fixed.design function that builds the emulators.

Value

a list containing:

  • payoff: a vector of length 'nrow(x)' containing the resulting payoffs NPV from $t=0$

  • tau matrix of the times when stopped. Columns represent the rights exercised

  • nsims number of total 1-step simulations performed


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