g2: G2 ++ model: constructor

Description Usage Arguments Value Examples

View source: R/G2-class.R

Description

g2 creates a g2++ model object.

Usage

1
2
g2(curve, horizon = 50, nsimul = 1000, a = numeric(0), b = numeric(0),
  sigma = numeric(0), eta = numeric(0), rho = numeric(0))

Arguments

curve

ZCCurve. Zero coupon curve as basis for projection.

horizon

Numeric. Projection horizon. Default to 50.

nsimul

Numeric. Number of simulation. Default to 1000.

a

Numeric. G2++ parameter. Optional.

b

Numeric. G2++ parameter. Optional.

sigma

Numeric. G2++ parameter. Optional.

eta

Numeric. G2++ parameter. Optional.

rho

Numeric. G2++ parameter. Optional.

Value

The model as a class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
rates <- c(-0.00316,-0.00269,-0.00203,-0.00122,
-0.00022,0.00092,0.00215,0.00342,0.00465,0.00581,
0.00684,0.00777,0.00861,0.00933,0.00989,0.0103,
0.01061,0.01092,0.01127,0.0117,0.01222,0.01281,
0.01345,0.01411,0.01478,0.01546,0.01613,0.01679,
0.01743,0.01806,0.01867,0.01926,0.01983,0.02038,
0.02092,0.02143,0.02192,0.02239,0.02285,0.02329,
0.02371,0.02411,0.0245,0.02488,0.02524,0.02558,
0.02592,0.02624,0.02655,0.02685)
curve <-curvezc(rates, "continuous")
g2model <- g2(curve, a=0.773511777, b=0.082013014,
sigma=0.022284644, eta=0.010382461, rho=-0.701985206)

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