| reserve | R Documentation |
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.