Skip to contents

The discrete increments that replace the Brownian increment in the weak methods, computed from a Gaussian sample so they keep its moments: calc_twopoint_random(sqdt, dW) is sqdt where dW > 0 and -sqdt otherwise; calc_threepoint_random(sq3dt, quantile, dW_scaled) is 0 when |dW_scaled| <= -quantile and +-sq3dt by the sign beyond it, with quantile the standard normal 1/6 quantile, so the outcomes have the probabilities 1/6, 2/3, 1/6 of a three point variable.

Usage

calc_twopoint_random(sqdt, dW)

calc_threepoint_random(sq3dt, quantile, dW_scaled)

Arguments

sqdt, sq3dt

sqrt(dt) and sqrt(3 dt).

dW, dW_scaled

Gaussian increments (dW_scaled = dW / sqrt(dt)).

quantile

The standard normal quantile qnorm(1/6).

Value

A numeric vector.

Examples

calc_twopoint_random(0.1, c(-0.3, 0.2))
#> [1] -0.1  0.1
calc_threepoint_random(sqrt(0.03), qnorm(1 / 6), c(-2, 0.1, 1.5))
#> [1] -0.1732051  0.0000000  0.1732051