A bound deal valued from its actual accounts
cashflow_valuation.RdAfter binding, cashflow_valuation() takes a deal's actual accounts at
the end of month month - 1 and cashflow_forward() simulates the
months from month to commutation from them (#603): the trust and the
operating account open at the actual balances, the premium already
collected is not collected again, and each simulation's ultimate loss
ratio is conditioned on the actual paid A (condition_on_paid()), its
loss still to pay following the rest of the paid pattern. Valuation is
at a month end, the engine's step.
Usage
cashflow_valuation(
terms,
month,
premium_collected = 0,
paid = 0,
collateral = 0,
funded = 0,
released = 0,
operating = 0,
flows = NULL,
funding_reference = NULL
)
cashflow_actual_state(terms, u, month, commission = 0, paid_pattern = NULL)
cashflow_forward(
valuation,
u,
commission = 0,
conditioning = c("bornhuetter-ferguson", "truncation")
)
cashflow_valuation_trace(
valuation,
u,
commission = 0,
conditioning = c("bornhuetter-ferguson", "truncation")
)Arguments
- terms
- month
The valuation month
v: the state is at the end of monthv - 1and the forward run starts at monthv.The premium paid into the trust to date. What the deal's schedule would have collected by then and the trust has not received (or received beyond it) is collected (or paid back) in month
v.- paid
The losses paid from the trust to date.
- collateral, operating
The trust's and the operating account's balances.
- funded
The capital the investor has paid into the trust, without the opening capital.
- released
The equity released to the investor.
- flows
NULL, or the investor's actual flows in months0tov - 1, for the return since inception.- funding_reference
NULL, or the obligation reference under the obligation-increase funding rule.- u
Ultimate loss ratios, one a simulation (
cashflow_actual_state(),cashflow_valuation_trace(): one).- commission
Commission rates, recycled to
u.- paid_pattern
NULLfor the terms' paid pattern, or the path's own, ascashflow_trace()'s.- valuation
A
cashflow_valuation.- conditioning
How each simulation's ultimate is conditioned on the paid to date:
"bornhuetter-ferguson"or"truncation", ascondition_on_paid().
Value
cashflow_valuation() a cashflow_valuation with share_paid
(the paid pattern reached before month v) and nav;
cashflow_actual_state() a list of the arguments above, for
do.call(cashflow_valuation, c(list(terms, month), state));
cashflow_forward() a list of kept (the simulations kept, from 1),
ultimate (their conditioned loss ratios), nav, flows (a matrix,
a row a kept simulation, months months), forward_rows and
forward_offsets, since_inception_rows and
since_inception_offsets (NULL without flows), forward_moic
(1 + net / (nav + funded after the valuation)),
since_inception_moic, and the totals since inception funded,
released, distributed, fee and commutation;
cashflow_valuation_trace() the accounts as cashflow_trace(), with
opening_balance the actual balances.
Details
The forward return takes the net asset value (nav, the trust's and
operating account's balances) as the investment at the valuation month:
forward_rows are the forward flows with nav paid in at their first
month. The return since inception puts the investor's actual flows to
date (flows) before each simulation's forward flows:
since_inception_rows. Read either with npv() and irr() on
forward_offsets or since_inception_offsets with unit = "months".
A valuation after a premium adjustment month is refused. Under
funding_rule = "obligation-increase" a valuation after month 0 needs
funding_reference, the obligation the next call is measured from (the
trace's funding_reference column). At month 0 the state must be empty,
and the forward flows are cashflow_run()'s.
cashflow_actual_state() gives the state of one simulated path, to
value it as if it had happened.
Examples
ramp <- function(m) pmin((1:48) / m, 1)
terms <- cashflow_terms(100, 36, ramp(12), ramp(24), ramp(36),
cashflow_requirement(c(outstanding = 1)))
# A path at a loss ratio of 0.8, valued after 12 months.
state <- cashflow_actual_state(terms, 0.8, 12)
val <- do.call(cashflow_valuation, c(list(terms, 12), state))
f <- cashflow_forward(val, c(0.5, 0.8, 1.2))
all.equal(f$since_inception_rows[2, ], cashflow_run(terms, 0.8)$flows[1, ])
#> [1] TRUE
npv(f$forward_rows, f$forward_offsets, 0.05, unit = "months")
#> [1] -33.33333 -53.33333 -80.00000