vsk: VSK: constructor

Description Usage Arguments Details Value Examples

View source: R/VSK-class.R

Description

vsk creates a vasicek model object.

Usage

1
2
vsk(q0 = NULL, a = NULL, b = NULL, horizon = 50, nsimul = 1000,
  sigma = NULL, index_histo = NULL, q_histo = NULL, W = NULL)

Arguments

q0

Numeric. Initial value of rate. Optional if index_histo or q_histo is given.

a

Numeric. Speed of reversion. Optional if index_histo or q_histo is given.

b

Numeric. Long-term mean for the model. Optional if index_histo or q_histo is given.

horizon

Numeric. Projection horizon. Default to 50.

nsimul

Numeric. Number of simulations. Default to 1000.

sigma

Numeric. Periodic volatility. Optional if index_histo or q_histo is given.

index_histo

Vector. History of the index to modelize. Optional if q0, a, b, sigma or q_histo is given. All values from the intervall must be given. Any missing value should be set to NA.

q_histo

Vector. History of rates to modelize. Optional if q0, a, b, sigma or index_histo is given. All values from the intervall must be given. Any missing value should be set to NA.

W

Matrix. Projection of the asset via a normal distribution. Optional.

Details

The rate at time t is computed as log(Index_t/Index_t-1)

Value

The model as a class.

Examples

1
2
3
4
5
index <- c(100,102.32,104.47,106.23,108.21,110.36,
111.66,112.4,112.97,114.84,116.7,119.03,121.46,124.01,126.33,
128.37,130.29,133.98,134.09,136.13,139.01,141.73,142.92,
143.66,143.71,144,145.41)
inflation <- vsk(index_histo = index)

ArnaudBu/esg2 documentation built on Oct. 20, 2021, 10:01 a.m.