A collateralised deal's monthly cash flows
cashflow_terms.Rdcashflow_terms() holds a deal's premium, monthly patterns, collateral
requirement and one rule for each account. Month t runs from 0 to the
commutation month T - 1. Each month the trust takes the capital called,
the premium collected and any adjustment, pays the month's claims, earns
interest and releases what it holds above the requirement to the
operating account, which pays the expenses and releases to the investor
what it holds above its buffer. At commutation the trust pays the
commutation requirement to the cedant, the operating account takes the
rest (or makes good a shortfall), pays the fee and distributes what is
left.
Usage
cashflow_terms(
premium,
commutation_month,
written,
earned,
paid,
requirement,
commutation_requirement = requirement,
collected_rate = 1,
deduct_commission = FALSE,
lag = 0,
adjustments = list(),
funding_dates = "monthly",
funding_rule = c("shortfall", "obligation-increase"),
premium_offset = 1,
reference = c("previous-date", "running-max"),
funding_source = c("investor", "operating-first"),
collateral_release = "monthly",
annual_yield = 0,
interest_basis = c("average", "opening", "closing"),
opening_fixed = 0,
opening_share = 0,
expense_rate = 0,
buffer_months = 0,
buffer_paid = FALSE,
buffer_expenses = FALSE,
equity_release = "monthly",
fee = NULL,
fee_basis = c("profit", "profit-over-premium", "profit-over-capital")
)
cashflow_run(
terms,
u,
commission = 0,
months_requirement = NULL,
paid_patterns = NULL,
pattern_index = NULL
)
cashflow_trace(terms, u, commission = 0, paid_pattern = NULL)Arguments
The premium
P.- commutation_month
T: the deal commutes at the end of monthT - 1.- written, earned, paid
Cumulative monthly shares of the premium written and earned and of the ultimate loss paid, all of one length, at least
Tplusbuffer_months.- requirement
- commutation_requirement
What the trust pays at commutation.
- collected_rate
The share of written premium paid into the trust.
- deduct_commission
Take each simulation's commission rate (
cashflow_run()'scommission) offcollected_rate. Without it the commission does not reduce the premium paid in and is read only by adjustments withless_commissionand by the fee: a flat commissioncis thencollected_rate = 1 - c, and a sliding scale needs this option.- lag
The months between writing and collection.
- adjustments
A list of
cashflow_adjustment()s.- funding_dates
The months capital may be called.
- funding_rule
"shortfall", what the trust lacks, or"obligation-increase", the rise inS_t - premium_offset * W_{t-lag}overreference, the obligation at the previous funding date or the highest at any earlier one.See
funding_rule.- funding_source
"investor", or"operating-first": the operating account pays what it holds first.- collateral_release
When the trust releases its excess.
- annual_yield
The trust's yield, compounded monthly.
- interest_basis
"average","opening"or"closing"balance.The operating account's opening capital,
opening_fixed + opening_share * premium.- expense_rate
The annual expense rate on the requirement, a twelfth a month.
- buffer_months, buffer_paid, buffer_expenses
The operating account keeps the requirement's rise over the next
buffer_monthsmonths, with the claims paid and the expenses over them when asked.- equity_release
When the operating account releases its excess to the investor.
- fee
NULL, or a performance fee'slist(breakpoints, slopes), astiered_fee().- fee_basis
What the fee's tiers read:
"profit","profit-over-premium"or"profit-over-capital".- terms
A
cashflow_terms.- u
Ultimate loss ratios, one a simulation (
cashflow_trace(): one).- commission
Commission rates, recycled to
u.- months_requirement
NULL, or each simulation's requirement month by month in place ofrequirement: a matrix with a row a simulation andcommutation_month + buffer_monthscolumns. The commutation requirement is still read from its terms.- paid_patterns
NULLfor the terms' paid pattern in every simulation, or paid patterns in its place (#600): a matrix with a row a pattern and one column per month of the terms' paid pattern, each row non-decreasing and ending at the same share as the terms'. Withoutpattern_indexthere is one row a simulation, in order. Not withmonths_requirement.- pattern_index
NULL, or each simulation's row ofpaid_patterns(from 1).- paid_pattern
NULLfor the terms' paid pattern, or one paid pattern in its place, as a row ofpaid_patterns.
Value
cashflow_terms() a cashflow_terms; cashflow_run() a list
of flows (a matrix), months and, a value a simulation, funded,
opening, released, distributed, fee, commutation and
paid_first (whether the first nonzero investor flow is positive: the
investor is paid before putting money in, so its flows can have
several internal rates of return and the one irr() finds is usually
meaningless; a requirement on the reserve alone does this);
cashflow_trace() a list of accounts (a data frame, a row a month),
commutation_paid, fee and conservation_error (the cash created or
lost over the deal, 0 up to rounding).
Details
cashflow_run() simulates the investor's flows for each ultimate loss
ratio u and commission rate: flows has a row a simulation and a
column a month (months, 0 to T - 1), positive when paid to the
investor, so npv(run$flows, run$months, rate, unit = "months") and
irr() read them. cashflow_trace() gives every account line of one
simulation.
Dates (funding_dates, collateral_release, equity_release) are
"monthly", "quarterly", a number of months (an interval from month
0), several months, list(months = ...) or list(every = n, first = m);
the two releases also take "at-commutation".
Examples
# A premium of 100 written at once, earned and paid evenly over three
# months; collateral is the reserve on earned premium and the deal
# commutes at the outstanding loss.
terms <- cashflow_terms(100, 3, rep(1, 3), (1:3) / 3, (1:3) / 3,
cashflow_requirement(c(reserve = 1)),
commutation_requirement = cashflow_requirement(c(outstanding = 1)))
run <- cashflow_run(terms, c(0.6, 1.5))
round(run$flows, 9)
#> [,1] [,2] [,3]
#> [1,] 80 -20 -20
#> [2,] 50 -50 -50
run$funded
#> [1] 40 100
npv(run$flows, run$months, 0.05, unit = "months")
#> [1] 40.24313 -49.39218
cashflow_trace(terms, 1.5)$accounts
#> month requirement premium adjustment paid funding_investor funding_operating
#> 1 0 0 100 0 50 0 0
#> 2 1 0 0 0 50 50 0
#> 3 2 0 0 0 50 50 0
#> interest collateral_release collateral_balance expenses equity_release
#> 1 0 50 0 0 50
#> 2 0 0 0 0 0
#> 3 0 0 0 0 0
#> operating_balance investor funding_reference
#> 1 0 50 0
#> 2 0 -50 0
#> 3 0 -50 0