Skip to contents

A catastrophe model's event loss table with secondary uncertainty. Each row is an event with an annual rate, a mean loss, independent and correlated standard deviations, and an exposure, the most it can lose. Events occur as independent Poisson processes; an event's loss, given that it occurs, is a beta distribution on [0, exposure] with the row's mean and standard deviation sd_independent + sd_correlated (summed, as catastrophe models report them for one portfolio), or the mean exactly when that is 0. A row whose standard deviation no beta on its exposure can have is an error naming the row.

Usage

event_loss_table(rate, mean, sd_independent, sd_correlated, exposure)

unit_event_loss_tables(
  event,
  unit,
  rate,
  mean,
  sd_independent,
  sd_correlated,
  exposure
)

elt_severity_moments(elt)

elt_oep(elt, x)

elt_occurrence_pml(elt, p)

simulate_elt(elt, n_years, seed = 0)

Arguments

rate, mean, sd_independent, sd_correlated, exposure

The table's columns, one value per event.

event, unit

Each row's event identifier and unit tag.

elt

An event_loss_table.

x

Losses.

p

Annual probabilities.

n_years

The number of years to simulate.

seed

Seed; year i draws from its own stream, so it replays alone.

Value

event_loss_table(): an event_loss_table, a list with the columns, rate (their sum, the mean number of events a year) and expected_annual_loss. elt_oep(): a data frame with x, exceedance_frequency and oep. elt_occurrence_pml(): the losses. simulate_elt(): a list with events, an event_set, and ids, a list per year of each loss's event row.

Details

unit_event_loss_tables() reads a long table of several units that share events, one row per event and unit (aggregate 2.1.0's elt unit A [...] elt unit B [...]): an event on several units is one occurrence. Its rolled is the portfolio's event_loss_table, each event's rows rolled up as aggregate does by default (the event's rate, which its rows must share; the means, exposures and correlated standard deviations summed, the independent ones in quadrature), and units one event_loss_table per unit, by tag. elt_severity_moments() gives the first three raw moments of one event's loss given that it occurs.

elt_oep() gives the occurrence exceedance probability 1 - exp(-sum(rate * P(L > x))) and the annual exceedance frequency; elt_occurrence_pml() the loss at an annual probability; simulate_elt() simulated years, each loss with the row of its event.

Examples

elt <- event_loss_table(rate = c(0.01, 0.05), mean = c(800, 200),
                        sd_independent = c(200, 0), sd_correlated = c(100, 0),
                        exposure = c(2000, 500))
elt$expected_annual_loss
#> [1] 18
elt_oep(elt, c(150, 1000))
#>      x exceedance_frequency         oep
#> 1  150          0.059965898 0.058203350
#> 2 1000          0.002571747 0.002568443
elt_occurrence_pml(elt, 0.01)
#> [1] 200
sim <- simulate_elt(elt, 1000, seed = 1)
sim$events@n_sims
#> [1] 1000
tabs <- unit_event_loss_tables(c("1", "2", "1", "3"), c("A", "A", "B", "B"),
                               rate = c(0.01, 0.05, 0.01, 0.02), mean = c(800, 200, 300, 100),
                               sd_independent = c(200, 0, 50, 30), sd_correlated = c(100, 0, 40, 0),
                               exposure = c(2000, 500, 1000, 400))
tabs$rolled$rate # event 1 counted once
#> [1] 0.08
elt_severity_moments(tabs$units$B)
#> [1] 1.666667e+02 3.996667e+04 1.236388e+07