Description Usage Format Value Methods Examples
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).
1 |
R6Class object.
Object of R6Class
newInitialization methods with arguments:
typetype of the surrender charge. It can be 1 (constant) or 2 or 3 (decreasing with time).
constpositive integer between 0 and 1 with the maximum surrender charge.
TPositive integer with expiry of the VA product.
getget the surrender penalty. Argument is time
a scalar in [0, T].
setset the maximum surrender penalty.
get_typeget the type of the surrender penalty
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.