rVAS: Simulation of the Vasicek model

View source: R/simVAS.R

rVASR Documentation

Simulation of the Vasicek model

Description

rVAS simulates a single path of the Vasicek process using its known conditional distribution. The parametric form of the Vasicek model used here is given by

dX_t = (α - κ X_t)dt + σ dW_t.

Usage

rVAS(n, Delta, X0, alpha, kappa, sigma)

Arguments

n

an integer indicating the sample size.

Delta

a single numeric, the time step between two consecutive observations.

X0

a single numeric, initial value of the process.

alpha

a single numeric, drift parameter.

kappa

a single numeric, rate of mean reversion.

sigma

a single numeric, volatility parameter.

Value

A ts object, a numeric vector with the sample path of the SDE.

Examples

x <- rVAS(360, Delta = 1/12, X0 = 0.09, alpha = 0.08, kappa = 0.9, sigma = 0.1)
plot(x)


alejandralopezperez/estsde documentation built on Sept. 4, 2022, 4:48 a.m.