sde.sim.ea {sde}R Documentation

Exact simulation algorithm EA1

Description

A rejection-method scheme for diffusions.

Usage

sde.sim.ea(t0 = 0, T = 1, X0 = 1, N = 100, delta, drift, drift.x, k1, k2, phi, max.psi = 1000, rh, A)

Arguments

t0 time origin
T horizon of simulation
X0 initial value of the process
N number of simulation steps
delta time-step of the simulation
drift drift coeffcient: a expression of two variables t and x
drift.x partial derivative of drift coeffcient wrt to x: a function of two variables t and x
k1 lower bound for psi(x) = 0.5*drift(x)^2 + 0.5*drift.x(x)
k2 upper bound for psi(x) = 0.5*drift(x)^2 + 0.5*drift.x(x)
phi the function psi(x) - k1
max.psi upper value of the support of psi to search for its maximum
rh the rejection function. Seed details.
A A(x) is the integral of the drift between 0 and x

Details

If missing k1 and k2 as well as A, rh and phi are calculated numerically by the function.

Value

X an invisible ts object

Author(s)

Stefano Maria Iacus

References

Beskos, A. and Roberts, G.O. (2005) Exact simulation of diffusions, Ann. Appl. Probab., 4, 2422-2444.

See Also

sde.sim

Examples

set.seed(123)
d <- expression(sin(x))
d.x <- expression(cos(x)) 
A <- function(x) 1-cos(x)
sde.sim.ea(delta=1/20, X0=0, N=500, drift=d, drift.x = d.x, A=A) -> Y
plot(Y, main="Periodic drift")

[Package sde version 1.1 Index]