Learn R Programming

Sim.DiffProc (version 2.5)

INFSR: Creating Ahn and Gao model or Inverse of Feller Square Root Models (by Milstein Scheme)

Description

Simulation the inverse of feller square root model by milstein scheme.

Usage

INFSR(N, M, t0, T, x0, theta, r, sigma, 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 ( X(t)*(theta-(sigma^3-theta*r)*X(t)) :drift coefficient).
r
constant ( X(t)*(theta-(sigma^3-theta*r)*X(t)) :drift coefficient).
sigma
constant positive ( sigma * X(t)^(3/2) :diffusion coefficient).
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) = X(t)*(theta-(sigma^3-theta*r)*X(t)) * dt + sigma * X(t)^(3/2) * dW(t)$$ With X(t)*(theta-(sigma^3-theta*r)*X(t)) :drift coefficient and sigma * X(t)^(3/2) :diffusion coefficient, W(t) is Wiener process, discretization dt = (T-t0)/N. The conditional distribution of this process is related to that of the Cox-Ingersoll-Ross (CIR) model.

See Also

CEV Constant Elasticity of Variance Models, CIR Cox-Ingersoll-Ross Models, CIRhy modified CIR and hyperbolic Process, CKLS Chan-Karolyi-Longstaff-Sanders Models, DWP Double-Well Potential Model, GBM Model of Black-Scholes, HWV Hull-White/Vasicek Models, JDP Jacobi Diffusion Process, PDP Pearson Diffusions Process, ROU Radial Ornstein-Uhlenbeck Process, diffBridge Diffusion Bridge Models, snssde Simulation Numerical Solution of SDE.

Examples

Run this code
## Inverse of Feller Square Root Models 
## dX(t) = X(t)*(0.5-(1^3-0.5*0.5)*X(t)) * dt + 1 * X(t)^(3/2) * dW(t)
## One trajectorie
 INFSR(N=1000,M=1,T=50,t0=0,x0=0.5,theta=0.5,r=0.5,sigma=1)

Run the code above in your browser using DataLab