sim.InnerCV {VarRedOpt}R Documentation

Function to apply Inner Control Variates Algorithm.

Description

Given matrix input with d dimension, this function aims to reduce the variance by applying Inner Control Variates algorithm. It uses input columns and their squares as inner control variates and applies feature selection for these control variates.

Usage

sim.InnerCV(zm, q.cv, ...)

Arguments

zm

A matrix with dimension d and length n.

q.cv

q function that sim.InnerCV function gets target vectors to apply variance reduction.

...

ellipsis parameter. different parameters can be passed depending on the problem.

Value

Updates Y value which stored in list 'results' and returns the list 'results' with updated Y value.

Examples

 sim.outer(n=1e3, d=3, q.outer = sim.InnerCV,
q.cv = myq_asian, K=100, ti=(1:3/12), r=0.03, sigma=0.3, S0=100)

sim.outer(n=1e6, d=6, q.outer = sim.AV, q.av = sim.InnerCV,
q.cv = myq_asian, K=105, ti=(1:6/12), r=0.03, sigma=0.3, S0=100)

[Package VarRedOpt version 0.1.0 Index]