sim.AV: Function to apply Antithetic Variates Algorithm.

Description Usage Arguments Value Examples

View source: R/simAV.R

Description

Given matrix input with d dimension, this function runs simulation two times using positive and negative signed versions of the input matrix.

Usage

1
sim.AV(zm, q.av, ...)

Arguments

zm

A matrix with dimension d and length n.

q.av

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

...

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

Value

y target vector with theoretically lower variance with the same expected value as the initial y vector.

Examples

1
2
3
4
5
 sim.outer(n=1e3, d=3, q.outer = sim.AV,
q.av = myq_asian, K=100, ti=(1:3/12), r=0.03, sigma=0.3, S0=100)

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

VarRedOpt documentation built on Dec. 8, 2020, 5:07 p.m.