Title: | Insurance Reserve Calculations |
---|---|
Description: | Calculates insurance reserves and equivalence premiums using advanced numerical methods, including the Runge-Kutta algorithm and product integrals for transition probabilities. This package is useful for actuarial analyses and life insurance modeling, facilitating accurate financial projections. |
Authors: | Oskar Allerslev [aut, cre] |
Maintainer: | Oskar Allerslev <[email protected]> |
License: | GPL-3 |
Version: | 0.0.8 |
Built: | 2025-01-30 05:24:35 UTC |
Source: | https://github.com/oskarallerslev/lifepack |
Productintegral This function calculates the productintegral of a matrix from s to t with a given number of steps for the runge kutta
prodint(A, s, t, n)
prodint(A, s, t, n)
A |
intensity matrix |
s |
initial timepoint |
t |
end timepoint |
n |
number of steps for the runge kutta algorithm |
returns a matrix (if using an intensity matrix as A you are given the transition probabilities)
Lambda <- function(x) matrix(c(-0.1, 0.1, 0, -0.1), 2, 2) prodint(Lambda, 0, 80, 100)
Lambda <- function(x) matrix(c(-0.1, 0.1, 0, -0.1), 2, 2) prodint(Lambda, 0, 80, 100)
Reserve This function calculates the reserve given the reward matrix and some constant rate This function requires proper construction of reward matrix as specified in the lecture notes provided in the course Liv1 at the University of Copenhagen.
reserve(t, TT, Lambda, R, mu, r, n)
reserve(t, TT, Lambda, R, mu, r, n)
t |
initial timepoint |
TT |
end timepoint |
Lambda |
intensity matrix |
R |
reward matrix |
mu |
equivalence premium |
r |
constant rate as a scalar |
n |
number of steps for the Runge-Kutta algorithm |
Returns a matrix of 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) reserve(0, 80, Lambda, R, 200000, 0.01, 1000)
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) reserve(0, 80, Lambda, R, 200000, 0.01, 1000)
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)
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)
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)