penalty_class: Surrender penalty class

Description Usage Format Value Methods Examples

Description

Class providing a surrender charge. It supports a constant surrender charge (type 1) and two surrender charges decreasing with time, (type 2 and type 3).

Usage

1

Format

R6Class object.

Value

Object of R6Class

Methods

new

Initialization methods with arguments:

type

type of the surrender charge. It can be 1 (constant) or 2 or 3 (decreasing with time).

const

positive integer between 0 and 1 with the maximum surrender charge.

T

Positive integer with expiry of the VA product.

get

get the surrender penalty. Argument is time a scalar in [0, T].

set

set the maximum surrender penalty.

get_type

get the type of the surrender penalty

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#Sets a constant penalty
penalty <- penalty_class$new(type = 1, const = 0.03)
penalty$get()
penalty$set(0.04)
penalty$get()
#Sets a time decreasing penalty of type 2
penalty <- penalty_class$new(type = 2, const = 0.08, T = 10)
penalty$get(time = 0)
penalty$get(time = 2)
penalty$set(0.05)
penalty$get(time = 0)
#Sets a time decreasing penalty of type 3
penalty <- penalty_class$new(type = 3, const = 0.08, T = 10)
penalty$get(time = 0)
penalty$get(time = 2)
penalty$set(0.05)
penalty$get(time = 0)

Example output

Loading required package: orthopolynom
Loading required package: polynom
[1] 0.03
[1] 0.04
[1] 0.08
[1] 0.04096
[1] 0.05
[1] 0.07688365
[1] 0.061995
[1] 0.004987521

valuer documentation built on May 2, 2019, 3:43 p.m.