Learn R Programming

Sim.DiffProc (version 2.5)

Hyproc: Creating The Hyperbolic Process (by Milstein Scheme)

Description

Simulation hyperbolic process by milstein scheme.

Usage

Hyproc(N, M, t0, T, x0, theta, output = FALSE)

Arguments

N
size of process.
M
number of trajectories.
t0
initial time.
T
final time.
x0
initial value of the process at time t0.
theta
constant positive.
output
if output = TRUE write a output to an Excel (.csv).

Value

  • data.frame(time,x) and plot of process.

Details

A process X satisfying : $$dX(t) = (-theta*X(t)/sqrt(1+X(t)^2)) *dt + dW(t)$$ With (-theta*X(t)/sqrt(1+X(t)^2)) :drift coefficient and 1 :diffusion coefficient, W(t) is Wiener process, discretization dt = (T-t0)/N. Constraints: theta > 0.

See Also

Hyprocg General Hyperbolic Diffusion, CIRhy modified CIR and hyperbolic Process, snssde Simulation Numerical Solution of SDE.

Examples

Run this code
## Hyperbolic Process 
## dX(t) = (-2*X(t)/sqrt(1+X(t)^2)) *dt + dW(t)
## One trajectorie
 Hyproc(N=1000,M=1,T=100,t0=0,x0=3,theta=2)

Run the code above in your browser using DataLab