Skip to contents

A latest valuation holds one value per origin at its own age: each origin's latest cumulative value, in one or several segments, with an exposure when the expected-loss methods need one. chain_ladder(), expected_loss(), bornhuetter_ferguson(), benktander() and cape_cod() project it with a selected pattern (ldf) or with the development of another fit (development), as chainladder-python's fit(source).predict(book) does (docs/design/reserving-v02.md, decisions 15 to 19). This is Python's LatestDiagonal; the name keeps latest_diagonal(), which returns a triangle's latest values, as it is.

Usage

latest_valuation(
  data,
  origin,
  latest,
  age = NULL,
  valuation = NULL,
  exposure = NULL,
  keys = NULL,
  origin_grain = "Y",
  past_pattern_end = c("reject", "no_development", "tail"),
  ptr = NULL
)

as_latest_valuation(
  triangle,
  column = NULL,
  exposure = NULL,
  past_pattern_end = "reject"
)

Arguments

data

A data.frame, one row per origin and segment.

origin

Name of the origin column: Dates (any day in the origin period) or whole-number years.

latest

Name of the column of latest cumulative values.

age

Name of the column of ages in months. Give exactly one of age and valuation.

valuation

The valuation month: one Date for every row, or the name of a column of Dates. A year alone is not accepted, since it would read as January.

exposure

Name of the exposure column, or NULL.

keys

Names of the key columns, or NULL for one segment.

origin_grain

"M", "Q", "S" or "Y".

past_pattern_end

"reject" (the default), "no_development" or "tail".

ptr

A LatestDiagonals pointer; used internally.

triangle

A triangle, with any number of segments.

column

Name of the column whose latest values the latest valuation holds; by default the only one.

Value

A latest_valuation object, with properties keys, index (one row per segment), origin_grain, origins, ages, latest, exposure (NULL when none was given) and past_pattern_end.

Details

Each origin is given once per segment, at a positive age in months (from the start of the origin period to the end of the valuation month: an accident year 2024 at December 2024 is 12 months), with its latest cumulative value (0 for an origin with nothing reported yet). The ages may be off the pattern's grid (18 months against an annual pattern): the fit reads them on the pattern's own ages, log(cdf) linear between them. An origin older than the pattern's end is an error unless past_pattern_end says how to develop it: "no_development" (a factor of 1 past the end, with no tail; a cumulative pattern whose level at its end is not 100% is then rescaled to 100% for every origin, so the young origins move too) or "tail" (the method's tail continued from the pattern's end at one step per origin period: a number or a tail_constant() with no attachment_age, or a tail_curve(), tail_bondy() or tail_log_linear() estimated on the pattern's own factors).

Segments are named by key columns, as a triangle's are, and sorted by label; within a segment the origins keep the order given. Rows run segment by segment in that order, as as.data.frame() lists them, and with_exposure() takes its values in that order.

A latest valuation has no link ratios, so mack(), the bootstraps and the one-year views need a triangle.

as_latest_valuation() takes a triangle's latest diagonal in every segment: each origin at the age of its last observed cell, with its cumulative value there, and with exposure that column's last observed value. chain_ladder(as_latest_valuation(book, "paid"), development = fit) is chainladder-python's fit(source).predict(book).

See also

as_latest_valuation() for a triangle's latest diagonal, with_exposure(), to_chain_ladder().

Examples

book <- data.frame(year = 2022:2024, paid = c(900, 600, 150), premium = 1000)
d <- latest_valuation(book, "year", "paid", valuation = as.Date("2024-12-31"),
                      exposure = "premium")
d@ages
#> [1] 36 24 12
chain_ladder(d, ldf = c("12" = 2, "24" = 1.25, "36" = 1), ldf_kind = "cdf")@ultimate
#> 2022 2023 2024 
#>  900  750  300 
bornhuetter_ferguson(d, apriori = 0.7, ldf = c("12" = 2, "24" = 1.25, "36" = 1),
                     ldf_kind = "cdf")@ultimate
#> 2022 2023 2024 
#>  900  740  500