In Python: build('...') or an %%agg cell.
agg Book # label 250 claims # volume 1000 xs 0 # coverage sev lognorm 100 cv 1.5 # severity poisson # frequency
Clauses in this order, coverage optional.
| volume | |
250 claims | expected claim count |
25000 loss | expected loss |
40000 premium at 65% lr | premium times loss ratio |
1000 exposure at 25 rate | units × rate |
dfreq [1 2 3] [.5 .3 .2] | listed counts and probabilities |
| coverage (optional) | |
1000 xs 0 | limit xs deductible, per claim |
| omit | for unlimited, from the ground up |
[500 1000] xs [0 0] | lists build a mixed book |
sev lognorm 100 cv 1.5 | family, mean, cv |
sev 50 * lognorm 1.2 | scale times shape |
sev 40 * lomax 2.5 + 40 | shifted |
sev lognorm [80 400] cv [1 2] wts [.7 .3] a mixture | |
dsev [1 2 10] [.4 .4 .2] | listed outcomes |
picks [250 1000] [20000 4500] | adjust expected loss by layer |
Common families: lognorm, gamma, pareto, expon, lomax, or any scipy.stats continuous family.
poisson | the textbook choice |
mixed gamma 0.3 | gamma mixing, cv 0.3 |
negbin 2 | variance twice the mean |
fixed | exactly the expected count |
binomial 0.5 | success probability 0.5 |
agg Book.Net 250 claims 1000 xs 0 sev lognorm 100 cv 1.5 occurrence net of 250 xs 750 poisson aggregate net of 5000 xs 30000
occurrence | each claim, before frequency |
aggregate | after frequency |
net of, ceded to | view output |
250 xs 250 and 500 xs 500 | limit xs attachment, lowest first |
50% po 500 xs 500 | partial placement |
tower [0 250 500 1000] | program breakpoints |
as "Cat XL" | label a layer |
rol 5% | rate on line |
deposit 600 | premium as an amount |
rate 100% | share of subject premium |
cede 30% | ceding commission |
reinstatements 1 at 100% | or no reinstatements |
swingslidepccorridor | variable terms, aggregate covers |
Terms follow a layer's limit and flow into a P&L, as in
500 xs 500 rol 5% cede 30%.
port Two.Books
agg Book 250 claims 1000 xs 0
sev lognorm 100 cv 1.5 poisson
agg Casualty 20 claims 2000 xs 0
sev lognorm 250 cv 2 mixed gamma 0.4
Units are independent, share one grid, and sum to the total. A unit is any agg,
with its own reinsurance, or a stored one such as agg.BasicBook. Pricing allocates by unit.
xpnl Book.PnL
38000 premium # or inherit or derive
less agg Book 250 claims 1000 xs 0
sev lognorm 100 cv 1.5
occurrence net of 250 xs 250 deposit 3400
and 500 xs 500 deposit 1600
poisson
less 25% premium expense as "G&A"
1000 fixed expense as "Overhead"
peel top-down # or bottom-up
38000 premium | the premium booked |
inherit premium | the engine's own premium |
derive premium | grossed up for expenses |
agg.Label | a stored engine |
port.Label | a stored portfolio, with pnl only |
5% loss expense | other bases |
500 fixed expense | optionally joined with and |
peel top-down | one block per layer (or bottom-up) |
pnl | same syntax, one consolidated block |
The PnL button wraps last object built.
; at the end of a line, separates statements.# commentBook.Net.10_000 65% inf; arithmetic within
parentheses, (3 * exp(4) / 2).[1 2 3][1:6][2:12:2].note{...}tags{...}hints{log2=16;}.agg.BasicBook, port.TwoLineBook reuse shipped objects; Ctrl+K searches them.distortion D wang 0.3 a pricing risk measure.bivariateclash two dependent lines.grossnet agg ... gross and net as one joint view.nttagg exact answers for small discrete books.