sreserve {lifepack}R Documentation

Reserve with Dynamic Rate

Description

This function calculates the reserve matrix using a dynamic interest rate function. It extends the functionality of the reserve function by allowing the rate to vary over time.

Usage

sreserve(t, TT, Lambda, R, mu, r, n)

Arguments

t

Initial timepoint

TT

End timepoint

Lambda

Intensity matrix

R

Reward matrix

mu

Equivalence premium

r

A function of time that returns the interest rate

n

Number of steps for the Runge-Kutta algorithm

Value

A matrix representing statewise reserves

Examples

Lambda <- function(x) matrix(c(-0.1, 0.1, 0, -0.1), 2, 2)
R <- function(x, mu) matrix(c(0, 0, 0, mu), 2, 2)
rentefun <- function(x) { 0.01 + 0.001 * x }  # Dynamic interest rate
sreserve(0, 80, Lambda, R, 200000, rentefun, 1000)

[Package lifepack version 0.1.0 Index]