SimCIR1F: Simulate 1 factor Cox Ingersoll Ross (CIR) model

Description Usage Arguments Value Examples

View source: R/sim-rates.R

Description

Monthly Simulation of rates using 1 factor CIR model

Usage

1
2
3
4
5
6
7
8
9
SimCIR1F(
  n = 1,
  param_list = list(r0 = 0.01, a = 0.5, b = 0.05, v = 0.05),
  rmin = NULL,
  t = 12,
  z_rand = NULL,
  col_rename = NULL,
  seed = NULL
)

Arguments

n

number of simulated trials

param_list

a 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

z_rand

optional vector standard normal random variables of length n * t

col_rename

optional name of output column

seed

optional starting seed

shift

optional additive shift post simulation

Value

data in the form of a tibble object with columns trial, time, r (or col_rename)

Examples

1
SimCIR1F(param_list = list(r0=.01, a=.5, b=.05, v=.05))

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