HWVF(N, M, t0, T, x0, theta, r, sigma, output = FALSE)
t0
.theta is the long-run equilibrium value
of the process
and r*(theta -X(t)) :drift coefficient
).r is speed of reversion
and r*(theta -X(t)):drift coefficient
).sigma (volatility) :diffusion coefficient
).output = TRUE
write a output
to an Excel (.csv).(HWV)
short rate class derives directly from SDE with mean-reverting drift: r *(theta- X(t)) :drift coefficient
and sigma : diffusion coefficient
, W(t)
is Wiener process, the discretization dt = (T-t0)/N
.
The process is also ergodic, and its invariant law is the Gaussian density
.HWV
Hull-White/Vasicek Models, PEOUG
Parametric Estimation of Hull-White/Vasicek Models, snssde
Simulation Numerical Solution of SDE.## flow of Hull-White/Vasicek Models
## dX(t) = 4 * (2.5 - X(t)) * dt + 1 *dW(t)
HWVF(N=1000,M=10,t0=0,T=1,x0=10,theta=2.5,r=4,sigma=1)
## if theta = 0 than "OUF" = "HWVF"
## dX(t) = 4 * ( 0 - X(t)) * dt + 1 *dW(t)
system.time(HWVF(N=1000,M=10,t0=0,T=1,x0=10,theta=0,r=4,sigma=1))
system.time(OUF(N=1000,M=5,t0=0,T=1,x0=10,r=4,sigma=1))
Run the code above in your browser using DataLab