ruin_prob_ls: Computing finite-time ruin probability for compound poisson...

Description Usage Arguments Details Value Examples

View source: R/lib_LS.R

Description

Computing finite-time ruin probability with initial surplus u and terminal time t, denoted ψ(u,t). Method described in "Finite-time ruin probabilities using bivariate Laguerre series" is used. For numerical stability, argument u_scale has to be tuned via uscale_search. In addition, u cannot be too large.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ruin_prob_ls(
  u,
  t,
  c,
  lambda,
  family,
  M = 20,
  psi_u = NULL,
  u_scale = 1,
  t_scale = 1,
  check = FALSE,
  include_error = FALSE
)

Arguments

u

Numerical of length 1. Initial surplus.

t

Numerical of length 1. Terminal time.

c

Numerical of length 1. Premium rate.

lambda

Numerical of length 1. Claim arrival rate ("lambda" parameter of the Poisson process).

family

An object returned by the family constructors, e.g. exponential()(), comb_exponential()(), gig()(), truncated_normal()() and weibull()().

M

Numerical of length 1. Default to be 20. How many Laguerre terms are used.

psi_u

Numerical of length 1 if not NULL. Whether a user-supplied ψ(u,t=∞) is used. For some distribution (e.g. exponential) this value can be computed analytically. It generally have negligible impact on the output.

u_scale

Numerical of length 1. Whether a monetary scale is applied. it would have a huge impact on the ouput. Recommend to use uscale_search to determine.

t_scale

Numerical of length 1. Whether a time scale is applied. It generally have negligible impact on the output.

check

Logical. Default to be FALSE. Whether to print some sensible checks.

include_error

Logical. Default to be FALSE. Whether to include the approximation error of ψ(u=0,t=∞).

Details

The net profit condition must be satisfied, i.e. c-lambda*family$mean>0.

Value

Numerical of length 1 if include_error is FALSE. Otherwise a list of length 2, with elements "res" and "err".

Examples

1
2
3
library(pruin)

ruin_prob_ls(u=10,t=2,c=1.1,lambda=1,family=exponential()(beta=1),u_scale = 0.6)

haydo1117/pruin documentation built on Feb. 12, 2022, 11:08 a.m.