| sreserve | R Documentation |
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.
sreserve(t, TT, Lambda, R, mu, r, n)
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 |
A matrix representing statewise reserves
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.