Simulation of Various Risk Processes

A (not yet exhaustive) collection of common models of risk processes in actuarial science, represented as formal S4 classes. Each class (risk model) has a simulator of its path, and a plotting function. Further, a Monte-Carlo estimator of a ruin probability for a finite time is implemented, using a parallel computation. Currently, the package extends two classical risk models Cramer-Lundberg and Sparre Andersen models by including capital injections, that are positive jumps (see Breuer L. and Badescu A.L. (2014) ). The intent of the package is to provide a user-friendly interface for ruin processes' simulators, as well as a solid and extensible structure for future extensions.


Travis-CI BuildStatus AppVeyor BuildStatus

Overview

The intention of the package is to provide simulation methods of common risk processes in a framework of ruin theory. Each model is implemented as an S4 class, having a simulator of its path, and a plotting function. Further, a Monte-Carlo estimator of a ruin probability for a finite time is implemented, using a parallel computation. Currently, the package extends two classical risk models, namely, Cramer-Lundberg and Sparre Andersen models by including capital injections (positive jumps).

Installation

The package is not yet submitted to CRAN. Instead, you can install ruin from github with:

# install.packages("devtools")
devtools::install_github("irudnyts/ruin")

Example

library(ruin)
#> Set default RNG to L'Ecuyer-CMRG for a safe parallel simulation.
 
model <- CramerLundberg(
  initial_capital = 10,
  premium_rate = 1,
  claim_poisson_arrival_rate = 1,
  claim_size_generator = rexp,
  claim_size_parameters = list(rate = 1)
)
 
ruin_probability(model = model, time_horizon = 10, return_paths = FALSE)
#> $ruin_probability
#> lower_bound    estimate upper_bound 
#>  0.03692248  0.04080000  0.04467752

News

ruin 0.1.1

  • initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ruin")

0.1.1 by Iegor Rudnytskyi, 9 months ago


http://github.com/irudnyts/ruin


Report a bug at http://github.com/irudnyts/ruin/issues


Browse source code at https://github.com/cran/ruin


Authors: Iegor Rudnytskyi [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports methods, parallel, ggplot2

Suggests testthat, actuar, knitr, rmarkdown


See at CRAN