sde_system: Solve arbitrary first order SDE systems

Description Usage Arguments Details Value

View source: R/EulerMaruyama.R

Description

A general Eule-Maruyama scheme implementation for arbitrary first-order SDE systems of finite dimension.

Usage

1
2
3
4
5
6
7
8
9
sde_system(
  IC,
  t0 = 0,
  tn = 1,
  drifts,
  diffusions,
  independent = FALSE,
  n = 1000
)

Arguments

IC

a list of variables with the same names as the non-time input as drifts, in the same order with initial values

t0

initial time

tn

ending time

drifts

a list of drift functions with as many variables as IC, and in the same order with the names

diffusions

a list of volatility functions with as many variables as IC, and in the same order with the names

independent

boolean to simulate processes driven by one Brownian motion (false) or as many independent Brownian motions as there are state variables

n

number of sub-intervals in time-grid

Details

The list of functions must have syntax h(t,x,y,z) for each element matching the elements of IC as list(x = y0, y = y0, z = z0) for example.

Value

data.frame


shill1729/sdes documentation built on Aug. 30, 2021, 6:36 p.m.