Actual against expected paid loss of a bound deal
deal_ave.RdThe actual cumulative paid actual[t] at the end of each month
t = 0, 1, ... against what the priced simulations expected (#603):
each simulation's u P S(t), with S the terms' paid pattern or the
simulation's own from paid_patterns. The expected paid comes from the
priced simulations, not conditioned ones. A reported loss works the same
way with the reported pattern as paid_patterns.
Usage
deal_ave(
actual,
terms,
u,
paid_patterns = NULL,
pattern_index = NULL,
levels = c(0.05, 0.5, 0.95)
)Arguments
- actual
The actual cumulative paid by the end of each month from month 0.
- terms
- u
The priced ultimate loss ratios, one a simulation.
- paid_patterns, pattern_index
NULL, or paid patterns ascashflow_run()'s.- levels
The percentile levels of the
qcolumns.
Value
A data frame, a row a month: month, actual, expected (the
mean over the simulations), ratio (actual / expected),
percentile (the actual's percentile among the simulations' expected
paid, ties counted half) and a column q<100 level> for each level
(numpy's linear quantile).
Examples
terms <- cashflow_terms(100, 4, rep(1, 4), rep(1, 4), c(0.25, 0.5, 0.75, 1),
cashflow_requirement(c(outstanding = 1)))
deal_ave(c(15, 45), terms, c(0.4, 0.6, 0.8))
#> month actual expected ratio percentile q5 q50 q95
#> 1 0 15 15 1.0 0.5 10.5 15 19.5
#> 2 1 45 30 1.5 1.0 21.0 30 39.0