SimVasicek2F: Simulate 2 factor Vasicek Model (stochastic mean reverting...

Description Usage Arguments Value Examples

View source: R/sim-rates.R

Description

Monthly Simulation of Inflation using 2-factor Vasicek (Hull White) Model

Usage

1
2
3
4
5
6
7
8
SimVasicek2F(
  n = 1,
  param_short = list(r0 = 0.01, a = 0.5, b = 0.05, v = 0.05, rmin = NULL),
  param_long = list(r0 = 0.01, a = 0.5, b = 0.05, v = 0.05, rmin = NULL),
  t = 12,
  rcorr = 0.5,
  seed = NULL
)

Arguments

n

number of simulated trials

param_short

(short rate ) a named list with parameters r0 - initial value, a - speed of mean reversion (annual), b - mean reversion level, v - annual volatility, rmin - optional rate lower bound

param_long

(mean reversion term) a named list with parameters r0 - initial value, a - speed of mean reversion (annual), b - mean reversion level, v - annual volatility, rmin - optional rate lower bound

t

number of future monthly timesteps

rcorr

correlation between long and short processes

seed

optional starting seed

Value

data in the form of a tibble object with columns trial, time, r1, r2

Examples

1
SimVasicek2F(param_short = list(r0=.01, a=.5, b=.05, v=.05), param_long = list(r0=.01, a=.5, b=.05, v=.05))

ZScore314/ESG documentation built on Feb. 11, 2022, 12:15 a.m.