# Capital modeling and portfolio pricing: CAS Monograph 15 reproduced

CAS Monograph 15 is *Introduction to Capital Modeling and Portfolio Management* (John Major and Stephen Mildenhall, 2026). It shows how an insurer prices its risk and splits the price over its business units, from a distribution of outcomes alone. The monograph's examples run in Mildenhall's Python package [aggregate](../reference/aggregate.Clash.md#prospicio.aggregate.Clash.aggregate). This guide runs them in prospicio and shows both sets of numbers.

Read the monograph for the reasoning (chapters 3 to 6 and 8) and this guide for the mechanics (chapter 9). Table numbers are the monograph's. Money is in the units of its examples.


# 1. The example company

The running example, InsCo, has three units, A, B and C, and ten equally likely simulated years. Each row is a year, and each cell is the unit's loss in that year. The first table is the last two rows of Table 9.1.


``` python
import pandas as pd
from great_tables import GT

from prospicio.distributions import Sampled
from prospicio.pricing import Portfolio
from prospicio.risk import Distortion

ROWS = [
    [5, 20, 11], [7, 33, 0], [15, 13, 0], [15, 7, 0], [13, 20, 7],
    [5, 27, 8], [15, 16, 9], [26, 19, 10], [17, 8, 40], [16, 20, 64],
]
insco = Portfolio(["A", "B", "C"], ROWS)
totals = [sum(row) for row in ROWS]

stats = []
for name, losses in zip(["A", "B", "C", "Total"], [*zip(*ROWS), totals]):
    s = Sampled([float(x) for x in losses])
    sd = (sum((x - s.mean()) ** 2 for x in losses) / len(losses)) ** 0.5
    stats.append([name, s.mean(), sd / s.mean()])
(GT(pd.DataFrame(stats, columns=["unit", "mean", "cv"]), rowname_col="unit")
 .tab_header("InsCo: mean and CV of each unit's loss", "Table 9.1, last two rows")
 .fmt_number("mean", decimals=2)
 .fmt_number("cv", decimals=3))
```


<style>
#jwqtftbefe table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#jwqtftbefe thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#jwqtftbefe p { margin: 0; padding: 0; }
 #jwqtftbefe .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #jwqtftbefe .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #jwqtftbefe .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #jwqtftbefe .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #jwqtftbefe .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #jwqtftbefe .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #jwqtftbefe .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #jwqtftbefe .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #jwqtftbefe .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #jwqtftbefe .gt_column_spanner_outer:first-child { padding-left: 0; }
 #jwqtftbefe .gt_column_spanner_outer:last-child { padding-right: 0; }
 #jwqtftbefe .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #jwqtftbefe .gt_spanner_row { border-bottom-style: hidden; }
 #jwqtftbefe .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #jwqtftbefe .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #jwqtftbefe .gt_from_md> :first-child { margin-top: 0; }
 #jwqtftbefe .gt_from_md> :last-child { margin-bottom: 0; }
 #jwqtftbefe .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #jwqtftbefe .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #jwqtftbefe .gt_indent_1 { text-indent: 5px; }
 #jwqtftbefe .gt_indent_2 { text-indent: calc(5px * 2); }
 #jwqtftbefe .gt_indent_3 { text-indent: calc(5px * 3); }
 #jwqtftbefe .gt_indent_4 { text-indent: calc(5px * 4); }
 #jwqtftbefe .gt_indent_5 { text-indent: calc(5px * 5); }
 #jwqtftbefe .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #jwqtftbefe .gt_row_group_first td { border-top-width: 2px; }
 #jwqtftbefe .gt_row_group_first th { border-top-width: 2px; }
 #jwqtftbefe .gt_striped { color: #333333; background-color: #F4F4F4; }
 #jwqtftbefe .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #jwqtftbefe .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #jwqtftbefe .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #jwqtftbefe .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #jwqtftbefe .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #jwqtftbefe .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #jwqtftbefe .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #jwqtftbefe .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #jwqtftbefe .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #jwqtftbefe .gt_left { text-align: left; }
 #jwqtftbefe .gt_center { text-align: center; }
 #jwqtftbefe .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #jwqtftbefe .gt_font_normal { font-weight: normal; }
 #jwqtftbefe .gt_font_bold { font-weight: bold; }
 #jwqtftbefe .gt_font_italic { font-style: italic; }
 #jwqtftbefe .gt_super { font-size: 65%; }
 #jwqtftbefe .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #jwqtftbefe .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #jwqtftbefe .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #jwqtftbefe .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #jwqtftbefe .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #jwqtftbefe .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="3" id="title" class="gt_heading gt_title gt_font_normal">InsCo: mean and CV of each unit's loss</th>
</tr>
<tr class="gt_heading">
<th colspan="3" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.1, last two rows</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="mean" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">mean</th>
<th id="cv" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">cv</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">A</th>
<td class="gt_row gt_right" headers="stub-1 mean">13.40</td>
<td class="gt_row gt_right" headers="stub-1 cv">0.453</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">B</th>
<td class="gt_row gt_right" headers="stub-2 mean">18.30</td>
<td class="gt_row gt_right" headers="stub-2 cv">0.412</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">C</th>
<td class="gt_row gt_right" headers="stub-3 mean">14.90</td>
<td class="gt_row gt_right" headers="stub-3 cv">1.324</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">Total</th>
<td class="gt_row gt_right" headers="stub-4 mean">46.60</td>
<td class="gt_row gt_right" headers="stub-4 cv">0.455</td>
</tr>
</tbody>
</table>


Unit C is the volatile one: a small mean and a loss of 64 in the worst year.

[Portfolio](../reference/pricing.Portfolio.md#prospicio.pricing.Portfolio) takes the rows directly. There is no frequency-severity model, no grid and no approximation.

Pricing works on the distinct totals, not on the years. Four years each total 40, so the portfolio keeps one scenario at 40 with probability 0.4. For each unit, it keeps the average loss at that total, the conditional expectation [kappa](../reference/pricing.Portfolio.md#prospicio.pricing.Portfolio.kappa). Each row of the table adds up to its total, so a split of the price by [kappa](../reference/pricing.Portfolio.md#prospicio.pricing.Portfolio.kappa) never creates or loses money. The row at 40 is Table 9.4.


``` python
kappa = pd.DataFrame(
    {"total": [f"{t:.0f}" for t in insco.totals], "probability": insco.probs,
     **{unit: insco.kappa(unit) for unit in ("A", "B", "C")}}
)
(GT(kappa, rowname_col="total")
 .tab_header("InsCo: expected loss of each unit at each total", "kappa, by distinct total")
 .fmt_number("probability", decimals=1)
 .fmt_number(["A", "B", "C"], decimals=2))
```


<style>
#hdtzmrtodu table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#hdtzmrtodu thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#hdtzmrtodu p { margin: 0; padding: 0; }
 #hdtzmrtodu .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #hdtzmrtodu .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #hdtzmrtodu .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #hdtzmrtodu .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #hdtzmrtodu .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #hdtzmrtodu .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #hdtzmrtodu .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #hdtzmrtodu .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #hdtzmrtodu .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #hdtzmrtodu .gt_column_spanner_outer:first-child { padding-left: 0; }
 #hdtzmrtodu .gt_column_spanner_outer:last-child { padding-right: 0; }
 #hdtzmrtodu .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #hdtzmrtodu .gt_spanner_row { border-bottom-style: hidden; }
 #hdtzmrtodu .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #hdtzmrtodu .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #hdtzmrtodu .gt_from_md> :first-child { margin-top: 0; }
 #hdtzmrtodu .gt_from_md> :last-child { margin-bottom: 0; }
 #hdtzmrtodu .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #hdtzmrtodu .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #hdtzmrtodu .gt_indent_1 { text-indent: 5px; }
 #hdtzmrtodu .gt_indent_2 { text-indent: calc(5px * 2); }
 #hdtzmrtodu .gt_indent_3 { text-indent: calc(5px * 3); }
 #hdtzmrtodu .gt_indent_4 { text-indent: calc(5px * 4); }
 #hdtzmrtodu .gt_indent_5 { text-indent: calc(5px * 5); }
 #hdtzmrtodu .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #hdtzmrtodu .gt_row_group_first td { border-top-width: 2px; }
 #hdtzmrtodu .gt_row_group_first th { border-top-width: 2px; }
 #hdtzmrtodu .gt_striped { color: #333333; background-color: #F4F4F4; }
 #hdtzmrtodu .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #hdtzmrtodu .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #hdtzmrtodu .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #hdtzmrtodu .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #hdtzmrtodu .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #hdtzmrtodu .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #hdtzmrtodu .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #hdtzmrtodu .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #hdtzmrtodu .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #hdtzmrtodu .gt_left { text-align: left; }
 #hdtzmrtodu .gt_center { text-align: center; }
 #hdtzmrtodu .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #hdtzmrtodu .gt_font_normal { font-weight: normal; }
 #hdtzmrtodu .gt_font_bold { font-weight: bold; }
 #hdtzmrtodu .gt_font_italic { font-style: italic; }
 #hdtzmrtodu .gt_super { font-size: 65%; }
 #hdtzmrtodu .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #hdtzmrtodu .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #hdtzmrtodu .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #hdtzmrtodu .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #hdtzmrtodu .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #hdtzmrtodu .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="5" id="title" class="gt_heading gt_title gt_font_normal">InsCo: expected loss of each unit at each total</th>
</tr>
<tr class="gt_heading">
<th colspan="5" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">kappa, by distinct total</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="probability" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">probability</th>
<th id="A" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">A</th>
<th id="B" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">B</th>
<th id="C" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">C</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">22</th>
<td class="gt_row gt_right" headers="stub-1 probability">0.1</td>
<td class="gt_row gt_right" headers="stub-1 A">15.00</td>
<td class="gt_row gt_right" headers="stub-1 B">7.00</td>
<td class="gt_row gt_right" headers="stub-1 C">0.00</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">28</th>
<td class="gt_row gt_right" headers="stub-2 probability">0.1</td>
<td class="gt_row gt_right" headers="stub-2 A">15.00</td>
<td class="gt_row gt_right" headers="stub-2 B">13.00</td>
<td class="gt_row gt_right" headers="stub-2 C">0.00</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">36</th>
<td class="gt_row gt_right" headers="stub-3 probability">0.1</td>
<td class="gt_row gt_right" headers="stub-3 A">5.00</td>
<td class="gt_row gt_right" headers="stub-3 B">20.00</td>
<td class="gt_row gt_right" headers="stub-3 C">11.00</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">40</th>
<td class="gt_row gt_right" headers="stub-4 probability">0.4</td>
<td class="gt_row gt_right" headers="stub-4 A">10.00</td>
<td class="gt_row gt_right" headers="stub-4 B">24.00</td>
<td class="gt_row gt_right" headers="stub-4 C">6.00</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">55</th>
<td class="gt_row gt_right" headers="stub-5 probability">0.1</td>
<td class="gt_row gt_right" headers="stub-5 A">26.00</td>
<td class="gt_row gt_right" headers="stub-5 B">19.00</td>
<td class="gt_row gt_right" headers="stub-5 C">10.00</td>
</tr>
<tr>
<th id="stub-6" class="gt_row gt_left gt_stub" scope="row">65</th>
<td class="gt_row gt_right" headers="stub-6 probability">0.1</td>
<td class="gt_row gt_right" headers="stub-6 A">17.00</td>
<td class="gt_row gt_right" headers="stub-6 B">8.00</td>
<td class="gt_row gt_right" headers="stub-6 C">40.00</td>
</tr>
<tr>
<th id="stub-7" class="gt_row gt_left gt_stub" scope="row">100</th>
<td class="gt_row gt_right" headers="stub-7 probability">0.1</td>
<td class="gt_row gt_right" headers="stub-7 A">16.00</td>
<td class="gt_row gt_right" headers="stub-7 B">20.00</td>
<td class="gt_row gt_right" headers="stub-7 C">64.00</td>
</tr>
</tbody>
</table>


``` python
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
for unit in ("A", "B", "C"):
    ax.plot(insco.totals, insco.kappa(unit), marker="o", label=f"unit {unit}")
ax.set_xlabel("total loss of the book")
ax.set_ylabel("expected loss of the unit at that total")
ax.set_title("InsCo: each unit's conditional expectation, kappa, by total")
ax.legend()
```


<figure class="p-figure figure">
<img src="data:image/svg+xml;base64,PHN2ZyB4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjQ0MC45OTgzNTlwdCIgaGVpZ2h0PSIyNjIuMTAyOTg0cHQiIHZpZXdib3g9IjAgMCA0NDAuOTk4MzU5IDI2Mi4xMDI5ODQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIj4KIDxtZXRhZGF0YT4KICA8cmRmIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgPHdvcms+CiAgICA8dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIj48L3R5cGU+CiAgICA8ZGF0ZT4yMDI2LTExLTI5VDE3OjIxOjI3LjY0ODY5MjwvZGF0ZT4KICAgIDxmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZm9ybWF0PgogICAgPGNyZWF0b3I+CiAgICAgPGFnZW50PgogICAgICA8dGl0bGU+TWF0cGxvdGxpYiB2My4xMS4yLCBodHRwczovL21hdHBsb3RsaWIub3JnLzwvdGl0bGU+CiAgICAgPC9hZ2VudD4KICAgIDwvY3JlYXRvcj4KICAgPC93b3JrPgogIDwvcmRmPgogPC9tZXRhZGF0YT4KIDxkZWZzPgogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+KntzdHJva2UtbGluZWpvaW46IHJvdW5kOyBzdHJva2UtbGluZWNhcDogYnV0dH08L3N0eWxlPgogPC9kZWZzPgogPGcgaWQ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Zz4KIDxkZWZzPgogIDxjbGlwcGF0aCBpZD0icGQ1MGU3OTQxNjQiPgogICA8cmVjdCB4PSI0My4xOTgzNTkiIHk9IjIyLjMxODEyNSIgd2lkdGg9IjM5MC42IiBoZWlnaHQ9IjE5OS41ODQiIC8+CiAgPC9jbGlwcGF0aD4KIDwvZGVmcz4KPC9zdmc+" />
</figure>


# 2. The capital standard

A price needs a capital standard: the assets that stand behind the book. Chapter 3 of the monograph defines value at risk (VaR, a quantile) and tail value at risk (TVaR, the average above that quantile). [aggregate](../reference/aggregate.Clash.md#prospicio.aggregate.Clash.aggregate) and prospicio read a standard of "p" as assets equal to the p quantile of the total. The table is Table 9.5:


``` python
total = Sampled([float(t) for t in totals])
standards = pd.DataFrame(
    [[f"{p:.2f}", total.quantile(p), total.tvar(p), insco.assets(p)] for p in (0.8, 0.85, 0.9, 1.0)],
    columns=["p", "VaR", "TVaR", "assets at p"],
)
(GT(standards, rowname_col="p")
 .tab_header("InsCo: capital standards", "Table 9.5")
 .fmt_number(["VaR", "assets at p"], decimals=0)
 .fmt_number("TVaR", decimals=3))
```


<style>
#sfinbosqzc table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#sfinbosqzc thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#sfinbosqzc p { margin: 0; padding: 0; }
 #sfinbosqzc .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #sfinbosqzc .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #sfinbosqzc .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #sfinbosqzc .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #sfinbosqzc .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #sfinbosqzc .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #sfinbosqzc .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #sfinbosqzc .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #sfinbosqzc .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #sfinbosqzc .gt_column_spanner_outer:first-child { padding-left: 0; }
 #sfinbosqzc .gt_column_spanner_outer:last-child { padding-right: 0; }
 #sfinbosqzc .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #sfinbosqzc .gt_spanner_row { border-bottom-style: hidden; }
 #sfinbosqzc .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #sfinbosqzc .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #sfinbosqzc .gt_from_md> :first-child { margin-top: 0; }
 #sfinbosqzc .gt_from_md> :last-child { margin-bottom: 0; }
 #sfinbosqzc .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #sfinbosqzc .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #sfinbosqzc .gt_indent_1 { text-indent: 5px; }
 #sfinbosqzc .gt_indent_2 { text-indent: calc(5px * 2); }
 #sfinbosqzc .gt_indent_3 { text-indent: calc(5px * 3); }
 #sfinbosqzc .gt_indent_4 { text-indent: calc(5px * 4); }
 #sfinbosqzc .gt_indent_5 { text-indent: calc(5px * 5); }
 #sfinbosqzc .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #sfinbosqzc .gt_row_group_first td { border-top-width: 2px; }
 #sfinbosqzc .gt_row_group_first th { border-top-width: 2px; }
 #sfinbosqzc .gt_striped { color: #333333; background-color: #F4F4F4; }
 #sfinbosqzc .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #sfinbosqzc .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #sfinbosqzc .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #sfinbosqzc .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #sfinbosqzc .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #sfinbosqzc .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #sfinbosqzc .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #sfinbosqzc .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #sfinbosqzc .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #sfinbosqzc .gt_left { text-align: left; }
 #sfinbosqzc .gt_center { text-align: center; }
 #sfinbosqzc .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #sfinbosqzc .gt_font_normal { font-weight: normal; }
 #sfinbosqzc .gt_font_bold { font-weight: bold; }
 #sfinbosqzc .gt_font_italic { font-style: italic; }
 #sfinbosqzc .gt_super { font-size: 65%; }
 #sfinbosqzc .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #sfinbosqzc .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #sfinbosqzc .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #sfinbosqzc .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #sfinbosqzc .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #sfinbosqzc .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="4" id="title" class="gt_heading gt_title gt_font_normal">InsCo: capital standards</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.5</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="VaR" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">VaR</th>
<th id="TVaR" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">TVaR</th>
<th id="assets-at-p" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">assets at p</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">0.80</th>
<td class="gt_row gt_right" headers="stub-1 VaR">55</td>
<td class="gt_row gt_right" headers="stub-1 TVaR">82.500</td>
<td class="gt_row gt_right" headers="stub-1 assets-at-p">55</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">0.85</th>
<td class="gt_row gt_right" headers="stub-2 VaR">65</td>
<td class="gt_row gt_right" headers="stub-2 TVaR">88.333</td>
<td class="gt_row gt_right" headers="stub-2 assets-at-p">65</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">0.90</th>
<td class="gt_row gt_right" headers="stub-3 VaR">65</td>
<td class="gt_row gt_right" headers="stub-3 TVaR">100.000</td>
<td class="gt_row gt_right" headers="stub-3 assets-at-p">65</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">1.00</th>
<td class="gt_row gt_right" headers="stub-4 VaR">100</td>
<td class="gt_row gt_right" headers="stub-4 TVaR">100.000</td>
<td class="gt_row gt_right" headers="stub-4 assets-at-p">100</td>
</tr>
</tbody>
</table>


With ten years, the 100% standard is the worst year. The monograph's main example uses it: assets of 100. A 99.5% standard gives the same assets.


# 3. Calibrating five distortions

The monograph prices with a **distortion** (a spectral risk measure): a function [g](../reference/pricing.Mbbefd.md#prospicio.pricing.Mbbefd.g) that increases the probability of bad outcomes. The price is the expected loss under the increased probabilities.

Here the whole book must earn 15% on capital, with assets of 100 and an expected loss of 46.6. The premium `P` and the capital `Q = 100 - P` satisfy `P - 46.6 = 0.15 Q`, so `P = 53.565`.

Five families each have one parameter: constant cost of capital (CCoC), proportional hazard (PH), Wang, dual power and TVaR. Calibration finds the parameter that gives that premium. The table compares it with Table 9.3:


``` python
FAMILIES = ["ccoc", "ph", "wang", "dual", "tvar"]
distortions = {
    family: insco.calibrate(family, assets=100, return_on_capital=0.15)
    for family in FAMILIES
}
BOOK_PARAMS_9_3 = {"ccoc": 0.150, "ph": 0.720, "wang": 0.343, "dual": 1.595, "tvar": 0.271}
rows = []
for family, d in distortions.items():
    ((name, value),) = d.parameters.items()
    rows.append([family, name, value, BOOK_PARAMS_9_3[family]])
(GT(pd.DataFrame(rows, columns=["distortion", "parameter", "prospicio", "book"]), rowname_col="distortion")
 .tab_header("InsCo: calibrated distortion parameters", "Table 9.3")
 .fmt_number(["prospicio", "book"], decimals=3))
```


<style>
#xkhgeojbku table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#xkhgeojbku thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#xkhgeojbku p { margin: 0; padding: 0; }
 #xkhgeojbku .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #xkhgeojbku .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #xkhgeojbku .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #xkhgeojbku .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #xkhgeojbku .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #xkhgeojbku .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #xkhgeojbku .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #xkhgeojbku .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #xkhgeojbku .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #xkhgeojbku .gt_column_spanner_outer:first-child { padding-left: 0; }
 #xkhgeojbku .gt_column_spanner_outer:last-child { padding-right: 0; }
 #xkhgeojbku .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #xkhgeojbku .gt_spanner_row { border-bottom-style: hidden; }
 #xkhgeojbku .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #xkhgeojbku .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #xkhgeojbku .gt_from_md> :first-child { margin-top: 0; }
 #xkhgeojbku .gt_from_md> :last-child { margin-bottom: 0; }
 #xkhgeojbku .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #xkhgeojbku .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #xkhgeojbku .gt_indent_1 { text-indent: 5px; }
 #xkhgeojbku .gt_indent_2 { text-indent: calc(5px * 2); }
 #xkhgeojbku .gt_indent_3 { text-indent: calc(5px * 3); }
 #xkhgeojbku .gt_indent_4 { text-indent: calc(5px * 4); }
 #xkhgeojbku .gt_indent_5 { text-indent: calc(5px * 5); }
 #xkhgeojbku .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #xkhgeojbku .gt_row_group_first td { border-top-width: 2px; }
 #xkhgeojbku .gt_row_group_first th { border-top-width: 2px; }
 #xkhgeojbku .gt_striped { color: #333333; background-color: #F4F4F4; }
 #xkhgeojbku .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #xkhgeojbku .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #xkhgeojbku .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #xkhgeojbku .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #xkhgeojbku .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #xkhgeojbku .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #xkhgeojbku .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #xkhgeojbku .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #xkhgeojbku .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #xkhgeojbku .gt_left { text-align: left; }
 #xkhgeojbku .gt_center { text-align: center; }
 #xkhgeojbku .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #xkhgeojbku .gt_font_normal { font-weight: normal; }
 #xkhgeojbku .gt_font_bold { font-weight: bold; }
 #xkhgeojbku .gt_font_italic { font-style: italic; }
 #xkhgeojbku .gt_super { font-size: 65%; }
 #xkhgeojbku .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #xkhgeojbku .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #xkhgeojbku .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #xkhgeojbku .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #xkhgeojbku .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #xkhgeojbku .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="4" id="title" class="gt_heading gt_title gt_font_normal">InsCo: calibrated distortion parameters</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.3</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="parameter" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col">parameter</th>
<th id="prospicio" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">prospicio</th>
<th id="book" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">book</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">ccoc</th>
<td class="gt_row gt_left" headers="stub-1 parameter">r</td>
<td class="gt_row gt_right" headers="stub-1 prospicio">0.150</td>
<td class="gt_row gt_right" headers="stub-1 book">0.150</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">ph</th>
<td class="gt_row gt_left" headers="stub-2 parameter">rho</td>
<td class="gt_row gt_right" headers="stub-2 prospicio">0.720</td>
<td class="gt_row gt_right" headers="stub-2 book">0.720</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">wang</th>
<td class="gt_row gt_left" headers="stub-3 parameter">lambda</td>
<td class="gt_row gt_right" headers="stub-3 prospicio">0.343</td>
<td class="gt_row gt_right" headers="stub-3 book">0.343</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">dual</th>
<td class="gt_row gt_left" headers="stub-4 parameter">beta</td>
<td class="gt_row gt_right" headers="stub-4 prospicio">1.595</td>
<td class="gt_row gt_right" headers="stub-4 book">1.595</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">tvar</th>
<td class="gt_row gt_left" headers="stub-5 parameter">p</td>
<td class="gt_row gt_right" headers="stub-5 prospicio">0.271</td>
<td class="gt_row gt_right" headers="stub-5 book">0.271</td>
</tr>
</tbody>
</table>


The CCoC parameter differs in meaning: [aggregate](../reference/aggregate.Clash.md#prospicio.aggregate.Clash.aggregate) uses a risk discount `d = 0.15 / 1.15`, prospicio the cost of capital `r = 0.15`. `Distortion.ccoc(0.15)` is the same function.

Each distortion is a curve `g(s)`. The figure draws the five curves that the calibration found. The grey line is `g(s) = s`, which gives no risk load. The price rises with the area between a curve and this line:


``` python
s_grid = [i / 100 for i in range(101)]
panels = [("ccoc", "ph", "wang"), ("dual", "tvar")]
fig, axes = plt.subplots(1, 2, figsize=(9.0, 3.6), sharey=True)
for ax, group in zip(axes, panels):
    ax.plot(s_grid, s_grid, color="0.75")
    for family in group:
        ax.plot(s_grid, [distortions[family].g(x) for x in s_grid], label=family)
    ax.set_xlabel("probability of exceedance, s")
    ax.legend()
axes[0].set_ylabel("distorted probability, g(s)")
axes[0].set_title("Distortions fitted to InsCo (1 of 2)")
axes[1].set_title("Distortions fitted to InsCo (2 of 2)")
```


    Text(0.0, 1.0, 'Distortions fitted to InsCo (2 of 2)')


<figure class="p-figure figure">
I2NiAKTCAzNTIuNTIxNTcgNTMuMjI3MjY2IAoiIHN0eWxlPSJmaWxsOiBub25lOyBzdHJva2U6IHZhcigtLXAtc2VyaWVzLTIpOyBzdHJva2Utd2lkdGg6IDEuNTsgc3Ryb2tlLWxpbmVjYXA6IHNxdWFyZSIgLz4KICAgIDwvZz4KICAgIDxnIGlkPSJ0ZXh0XzI4Ij4KICAgICA8dGV4dCBzdHlsZT0iZm9udC1zaXplOiAxMXB4OyBmb250LWZhbWlseTogdmFyKC0tcC1mb250KTsgdGV4dC1hbmNob3I6IHN0YXJ0OyBmaWxsOiB2YXIoLS1wLWluaykiIHg9IjM2MS4zMjE1NyIgeT0iNTcuMDc3MjY2IiB0cmFuc2Zvcm09InJvdGF0ZSgtMCAzNjEuMzIxNTcgNTcuMDc3MjY2KSI+dHZhcjwvdGV4dD4KICAgIDwvZz4KICAgPC9nPgogIDwvZz4KIDwvZz4KIDxkZWZzPgogIDxjbGlwcGF0aCBpZD0icGYwZjBiYjBjYTEiPgogICA8cmVjdCB4PSI0Ni42OTQyOTciIHk9IjIyLjMxODEyNSIgd2lkdGg9IjIyOC4yNzI3MjciIGhlaWdodD0iMTk5LjU4NCIgLz4KICA8L2NsaXBwYXRoPgogIDxjbGlwcGF0aCBpZD0icDE1YTMzMjQ3NzQiPgogICA8cmVjdCB4PSIzMjAuNjIxNTciIHk9IjIyLjMxODEyNSIgd2lkdGg9IjIyOC4yNzI3MjciIGhlaWdodD0iMTk5LjU4NCIgLz4KICA8L2NsaXBwYXRoPgogPC9kZWZzPgo8L3N2Zz4=" />
</figure>


# 4. The price and its allocation to units

After calibration, [price](../reference/pricing.price.md#prospicio.pricing.price) returns the premium of the loss capped at the assets. It also returns the **natural allocation** of that premium: each unit pays the distorted average of its own loss in the bad years, so a unit that loses most when the total is large pays more. With `allocation="linear"`, [price](../reference/pricing.price.md#prospicio.pricing.price) also splits the assets by expected shares above the asset level. This is Table 9.6, the "industry standard" CCoC pricing:


``` python
priced = insco.price(distortions["ccoc"], assets=100, allocation="linear")
rows = []
for name, u in zip(priced.units + ["Total"], [*priced.allocated, priced.total]):
    rows.append([name, u.loss, u.assets, u.capital, u.premium, u.premium - u.loss, (u.premium - u.loss) / u.capital])
(GT(pd.DataFrame(rows, columns=["unit", "L", "a", "Q", "P", "M", "COC"]), rowname_col="unit")
 .tab_header("InsCo: CCoC pricing at 15%", "Table 9.6; L loss, a assets, Q capital, P premium, M margin, COC margin over capital")
 .fmt_number(["L", "a", "Q", "P", "M", "COC"], decimals=3))
```


<style>
#ojfronvlhj table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#ojfronvlhj thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#ojfronvlhj p { margin: 0; padding: 0; }
 #ojfronvlhj .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #ojfronvlhj .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #ojfronvlhj .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #ojfronvlhj .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #ojfronvlhj .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #ojfronvlhj .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ojfronvlhj .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #ojfronvlhj .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #ojfronvlhj .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #ojfronvlhj .gt_column_spanner_outer:first-child { padding-left: 0; }
 #ojfronvlhj .gt_column_spanner_outer:last-child { padding-right: 0; }
 #ojfronvlhj .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #ojfronvlhj .gt_spanner_row { border-bottom-style: hidden; }
 #ojfronvlhj .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #ojfronvlhj .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #ojfronvlhj .gt_from_md> :first-child { margin-top: 0; }
 #ojfronvlhj .gt_from_md> :last-child { margin-bottom: 0; }
 #ojfronvlhj .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #ojfronvlhj .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #ojfronvlhj .gt_indent_1 { text-indent: 5px; }
 #ojfronvlhj .gt_indent_2 { text-indent: calc(5px * 2); }
 #ojfronvlhj .gt_indent_3 { text-indent: calc(5px * 3); }
 #ojfronvlhj .gt_indent_4 { text-indent: calc(5px * 4); }
 #ojfronvlhj .gt_indent_5 { text-indent: calc(5px * 5); }
 #ojfronvlhj .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #ojfronvlhj .gt_row_group_first td { border-top-width: 2px; }
 #ojfronvlhj .gt_row_group_first th { border-top-width: 2px; }
 #ojfronvlhj .gt_striped { color: #333333; background-color: #F4F4F4; }
 #ojfronvlhj .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ojfronvlhj .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ojfronvlhj .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #ojfronvlhj .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ojfronvlhj .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ojfronvlhj .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #ojfronvlhj .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #ojfronvlhj .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #ojfronvlhj .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ojfronvlhj .gt_left { text-align: left; }
 #ojfronvlhj .gt_center { text-align: center; }
 #ojfronvlhj .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #ojfronvlhj .gt_font_normal { font-weight: normal; }
 #ojfronvlhj .gt_font_bold { font-weight: bold; }
 #ojfronvlhj .gt_font_italic { font-style: italic; }
 #ojfronvlhj .gt_super { font-size: 65%; }
 #ojfronvlhj .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #ojfronvlhj .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #ojfronvlhj .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #ojfronvlhj .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ojfronvlhj .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #ojfronvlhj .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="7" id="title" class="gt_heading gt_title gt_font_normal">InsCo: CCoC pricing at 15%</th>
</tr>
<tr class="gt_heading">
<th colspan="7" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.6; L loss, a assets, Q capital, P premium, M margin, COC margin over capital</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="L" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">L</th>
<th id="a" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">a</th>
<th id="Q" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">Q</th>
<th id="P" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">P</th>
<th id="M" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">M</th>
<th id="COC" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">COC</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">A</th>
<td class="gt_row gt_right" headers="stub-1 L">13.400</td>
<td class="gt_row gt_right" headers="stub-1 a">16.000</td>
<td class="gt_row gt_right" headers="stub-1 Q">2.261</td>
<td class="gt_row gt_right" headers="stub-1 P">13.739</td>
<td class="gt_row gt_right" headers="stub-1 M">0.339</td>
<td class="gt_row gt_right" headers="stub-1 COC">0.150</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">B</th>
<td class="gt_row gt_right" headers="stub-2 L">18.300</td>
<td class="gt_row gt_right" headers="stub-2 a">20.000</td>
<td class="gt_row gt_right" headers="stub-2 Q">1.478</td>
<td class="gt_row gt_right" headers="stub-2 P">18.522</td>
<td class="gt_row gt_right" headers="stub-2 M">0.222</td>
<td class="gt_row gt_right" headers="stub-2 COC">0.150</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">C</th>
<td class="gt_row gt_right" headers="stub-3 L">14.900</td>
<td class="gt_row gt_right" headers="stub-3 a">64.000</td>
<td class="gt_row gt_right" headers="stub-3 Q">42.696</td>
<td class="gt_row gt_right" headers="stub-3 P">21.304</td>
<td class="gt_row gt_right" headers="stub-3 M">6.404</td>
<td class="gt_row gt_right" headers="stub-3 COC">0.150</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">Total</th>
<td class="gt_row gt_right" headers="stub-4 L">46.600</td>
<td class="gt_row gt_right" headers="stub-4 a">100.000</td>
<td class="gt_row gt_right" headers="stub-4 Q">46.435</td>
<td class="gt_row gt_right" headers="stub-4 P">53.565</td>
<td class="gt_row gt_right" headers="stub-4 M">6.965</td>
<td class="gt_row gt_right" headers="stub-4 COC">0.150</td>
</tr>
</tbody>
</table>


Every unit earns 15% on its allocated capital, because this allocation defines capital that way. Unit C takes 64 of the 100 of assets and most of the margin (6.4 of 7.0).

The five distortions give the same total premium, because calibration sets it. They differ in which unit pays. Rows alternate prospicio and Table 9.8:


``` python
def with_book(got, book, columns):
    """Rows alternate prospicio (`X`) and the monograph (`X, book`)."""
    rows = []
    for family, values in got.items():
        rows += [[family, *values], [f"{family}, book", *book[family]]]
    return pd.DataFrame(rows, columns=["distortion", *columns])


BOOK_P = {  # Table 9.8, premium by unit (A, B, C)
    "ccoc": (13.739, 18.522, 21.304),
    "ph": (14.060, 18.349, 21.156),
    "wang": (14.109, 18.637, 20.819),
    "dual": (14.127, 19.117, 20.322),
    "tvar": (13.783, 20.412, 19.371),
}
got = {
    family: [u.premium for u in insco.price(d, assets=100).allocated]
    for family, d in distortions.items()
}
(GT(with_book(got, BOOK_P, ["A", "B", "C"]), rowname_col="distortion")
 .tab_header("InsCo: premium by unit under five distortions", "Table 9.8")
 .fmt_number(["A", "B", "C"], decimals=3))
```


<style>
#gbnpyhrexx table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#gbnpyhrexx thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#gbnpyhrexx p { margin: 0; padding: 0; }
 #gbnpyhrexx .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #gbnpyhrexx .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #gbnpyhrexx .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #gbnpyhrexx .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #gbnpyhrexx .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #gbnpyhrexx .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #gbnpyhrexx .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #gbnpyhrexx .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #gbnpyhrexx .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #gbnpyhrexx .gt_column_spanner_outer:first-child { padding-left: 0; }
 #gbnpyhrexx .gt_column_spanner_outer:last-child { padding-right: 0; }
 #gbnpyhrexx .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #gbnpyhrexx .gt_spanner_row { border-bottom-style: hidden; }
 #gbnpyhrexx .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #gbnpyhrexx .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #gbnpyhrexx .gt_from_md> :first-child { margin-top: 0; }
 #gbnpyhrexx .gt_from_md> :last-child { margin-bottom: 0; }
 #gbnpyhrexx .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #gbnpyhrexx .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #gbnpyhrexx .gt_indent_1 { text-indent: 5px; }
 #gbnpyhrexx .gt_indent_2 { text-indent: calc(5px * 2); }
 #gbnpyhrexx .gt_indent_3 { text-indent: calc(5px * 3); }
 #gbnpyhrexx .gt_indent_4 { text-indent: calc(5px * 4); }
 #gbnpyhrexx .gt_indent_5 { text-indent: calc(5px * 5); }
 #gbnpyhrexx .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #gbnpyhrexx .gt_row_group_first td { border-top-width: 2px; }
 #gbnpyhrexx .gt_row_group_first th { border-top-width: 2px; }
 #gbnpyhrexx .gt_striped { color: #333333; background-color: #F4F4F4; }
 #gbnpyhrexx .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #gbnpyhrexx .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #gbnpyhrexx .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #gbnpyhrexx .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #gbnpyhrexx .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #gbnpyhrexx .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #gbnpyhrexx .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #gbnpyhrexx .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #gbnpyhrexx .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #gbnpyhrexx .gt_left { text-align: left; }
 #gbnpyhrexx .gt_center { text-align: center; }
 #gbnpyhrexx .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #gbnpyhrexx .gt_font_normal { font-weight: normal; }
 #gbnpyhrexx .gt_font_bold { font-weight: bold; }
 #gbnpyhrexx .gt_font_italic { font-style: italic; }
 #gbnpyhrexx .gt_super { font-size: 65%; }
 #gbnpyhrexx .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #gbnpyhrexx .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #gbnpyhrexx .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #gbnpyhrexx .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #gbnpyhrexx .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #gbnpyhrexx .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="4" id="title" class="gt_heading gt_title gt_font_normal">InsCo: premium by unit under five distortions</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.8</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="A" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">A</th>
<th id="B" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">B</th>
<th id="C" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">C</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">ccoc</th>
<td class="gt_row gt_right" headers="stub-1 A">13.739</td>
<td class="gt_row gt_right" headers="stub-1 B">18.522</td>
<td class="gt_row gt_right" headers="stub-1 C">21.304</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">ccoc, book</th>
<td class="gt_row gt_right" headers="stub-2 A">13.739</td>
<td class="gt_row gt_right" headers="stub-2 B">18.522</td>
<td class="gt_row gt_right" headers="stub-2 C">21.304</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">ph</th>
<td class="gt_row gt_right" headers="stub-3 A">14.060</td>
<td class="gt_row gt_right" headers="stub-3 B">18.349</td>
<td class="gt_row gt_right" headers="stub-3 C">21.156</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">ph, book</th>
<td class="gt_row gt_right" headers="stub-4 A">14.060</td>
<td class="gt_row gt_right" headers="stub-4 B">18.349</td>
<td class="gt_row gt_right" headers="stub-4 C">21.156</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">wang</th>
<td class="gt_row gt_right" headers="stub-5 A">14.109</td>
<td class="gt_row gt_right" headers="stub-5 B">18.637</td>
<td class="gt_row gt_right" headers="stub-5 C">20.819</td>
</tr>
<tr>
<th id="stub-6" class="gt_row gt_left gt_stub" scope="row">wang, book</th>
<td class="gt_row gt_right" headers="stub-6 A">14.109</td>
<td class="gt_row gt_right" headers="stub-6 B">18.637</td>
<td class="gt_row gt_right" headers="stub-6 C">20.819</td>
</tr>
<tr>
<th id="stub-7" class="gt_row gt_left gt_stub" scope="row">dual</th>
<td class="gt_row gt_right" headers="stub-7 A">14.127</td>
<td class="gt_row gt_right" headers="stub-7 B">19.117</td>
<td class="gt_row gt_right" headers="stub-7 C">20.322</td>
</tr>
<tr>
<th id="stub-8" class="gt_row gt_left gt_stub" scope="row">dual, book</th>
<td class="gt_row gt_right" headers="stub-8 A">14.127</td>
<td class="gt_row gt_right" headers="stub-8 B">19.117</td>
<td class="gt_row gt_right" headers="stub-8 C">20.322</td>
</tr>
<tr>
<th id="stub-9" class="gt_row gt_left gt_stub" scope="row">tvar</th>
<td class="gt_row gt_right" headers="stub-9 A">13.783</td>
<td class="gt_row gt_right" headers="stub-9 B">20.412</td>
<td class="gt_row gt_right" headers="stub-9 C">19.371</td>
</tr>
<tr>
<th id="stub-10" class="gt_row gt_left gt_stub" scope="row">tvar, book</th>
<td class="gt_row gt_right" headers="stub-10 A">13.783</td>
<td class="gt_row gt_right" headers="stub-10 B">20.412</td>
<td class="gt_row gt_right" headers="stub-10 C">19.371</td>
</tr>
</tbody>
</table>


All fifteen premiums match. CCoC charges for the capital each unit uses, and C uses 64 of the 100, so C pays most. TVaR charges only for the worst years, where B's 20 is a larger share of the total than its average share, so B pays more. Neither distortion is right: it states what you are paid to bear (see [Risk loads and distortions](risk-loads-and-distortions.md)).


# 5. Capital by unit, if you must

Section 8.3 of the monograph advises against capital allocation, because layers of capital cost different amounts. It allocates margin instead. To state the capital that each unit uses, it allocates each layer of the asset range by the units' shares of that layer's margin, and adds the layers. In prospicio this is `allocation="lifted"`:


``` python
BOOK_Q = {  # Table 9.8, capital by unit (A, B, C)
    "ccoc": (4.874, 5.288, 36.273),
    "ph": (7.074, 6.565, 32.796),
    "wang": (8.411, 8.691, 29.333),
    "dual": (8.873, 9.143, 28.419),
    "tvar": (9.034, 9.247, 28.154),
}
got = {
    family: [u.capital for u in insco.price(d, assets=100, allocation="lifted").allocated]
    for family, d in distortions.items()
}
(GT(with_book(got, BOOK_Q, ["A", "B", "C"]), rowname_col="distortion")
 .tab_header("InsCo: capital by unit, lifted allocation", "Table 9.8; the assets are 100")
 .fmt_number(["A", "B", "C"], decimals=3))
```


<style>
#uqdyleogco table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#uqdyleogco thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#uqdyleogco p { margin: 0; padding: 0; }
 #uqdyleogco .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #uqdyleogco .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #uqdyleogco .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #uqdyleogco .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #uqdyleogco .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #uqdyleogco .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #uqdyleogco .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #uqdyleogco .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #uqdyleogco .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #uqdyleogco .gt_column_spanner_outer:first-child { padding-left: 0; }
 #uqdyleogco .gt_column_spanner_outer:last-child { padding-right: 0; }
 #uqdyleogco .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #uqdyleogco .gt_spanner_row { border-bottom-style: hidden; }
 #uqdyleogco .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #uqdyleogco .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #uqdyleogco .gt_from_md> :first-child { margin-top: 0; }
 #uqdyleogco .gt_from_md> :last-child { margin-bottom: 0; }
 #uqdyleogco .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #uqdyleogco .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #uqdyleogco .gt_indent_1 { text-indent: 5px; }
 #uqdyleogco .gt_indent_2 { text-indent: calc(5px * 2); }
 #uqdyleogco .gt_indent_3 { text-indent: calc(5px * 3); }
 #uqdyleogco .gt_indent_4 { text-indent: calc(5px * 4); }
 #uqdyleogco .gt_indent_5 { text-indent: calc(5px * 5); }
 #uqdyleogco .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #uqdyleogco .gt_row_group_first td { border-top-width: 2px; }
 #uqdyleogco .gt_row_group_first th { border-top-width: 2px; }
 #uqdyleogco .gt_striped { color: #333333; background-color: #F4F4F4; }
 #uqdyleogco .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #uqdyleogco .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #uqdyleogco .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #uqdyleogco .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #uqdyleogco .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #uqdyleogco .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #uqdyleogco .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #uqdyleogco .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #uqdyleogco .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #uqdyleogco .gt_left { text-align: left; }
 #uqdyleogco .gt_center { text-align: center; }
 #uqdyleogco .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #uqdyleogco .gt_font_normal { font-weight: normal; }
 #uqdyleogco .gt_font_bold { font-weight: bold; }
 #uqdyleogco .gt_font_italic { font-style: italic; }
 #uqdyleogco .gt_super { font-size: 65%; }
 #uqdyleogco .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #uqdyleogco .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #uqdyleogco .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #uqdyleogco .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #uqdyleogco .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #uqdyleogco .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="4" id="title" class="gt_heading gt_title gt_font_normal">InsCo: capital by unit, lifted allocation</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.8; the assets are 100</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="A" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">A</th>
<th id="B" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">B</th>
<th id="C" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">C</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">ccoc</th>
<td class="gt_row gt_right" headers="stub-1 A">2.261</td>
<td class="gt_row gt_right" headers="stub-1 B">1.478</td>
<td class="gt_row gt_right" headers="stub-1 C">42.696</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">ccoc, book</th>
<td class="gt_row gt_right" headers="stub-2 A">4.874</td>
<td class="gt_row gt_right" headers="stub-2 B">5.288</td>
<td class="gt_row gt_right" headers="stub-2 C">36.273</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">ph</th>
<td class="gt_row gt_right" headers="stub-3 A">6.481</td>
<td class="gt_row gt_right" headers="stub-3 B">5.597</td>
<td class="gt_row gt_right" headers="stub-3 C">34.356</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">ph, book</th>
<td class="gt_row gt_right" headers="stub-4 A">7.074</td>
<td class="gt_row gt_right" headers="stub-4 B">6.565</td>
<td class="gt_row gt_right" headers="stub-4 C">32.796</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">wang</th>
<td class="gt_row gt_right" headers="stub-5 A">8.411</td>
<td class="gt_row gt_right" headers="stub-5 B">8.691</td>
<td class="gt_row gt_right" headers="stub-5 C">29.333</td>
</tr>
<tr>
<th id="stub-6" class="gt_row gt_left gt_stub" scope="row">wang, book</th>
<td class="gt_row gt_right" headers="stub-6 A">8.411</td>
<td class="gt_row gt_right" headers="stub-6 B">8.691</td>
<td class="gt_row gt_right" headers="stub-6 C">29.333</td>
</tr>
<tr>
<th id="stub-7" class="gt_row gt_left gt_stub" scope="row">dual</th>
<td class="gt_row gt_right" headers="stub-7 A">8.873</td>
<td class="gt_row gt_right" headers="stub-7 B">9.143</td>
<td class="gt_row gt_right" headers="stub-7 C">28.419</td>
</tr>
<tr>
<th id="stub-8" class="gt_row gt_left gt_stub" scope="row">dual, book</th>
<td class="gt_row gt_right" headers="stub-8 A">8.873</td>
<td class="gt_row gt_right" headers="stub-8 B">9.143</td>
<td class="gt_row gt_right" headers="stub-8 C">28.419</td>
</tr>
<tr>
<th id="stub-9" class="gt_row gt_left gt_stub" scope="row">tvar</th>
<td class="gt_row gt_right" headers="stub-9 A">9.034</td>
<td class="gt_row gt_right" headers="stub-9 B">9.247</td>
<td class="gt_row gt_right" headers="stub-9 C">28.154</td>
</tr>
<tr>
<th id="stub-10" class="gt_row gt_left gt_stub" scope="row">tvar, book</th>
<td class="gt_row gt_right" headers="stub-10 A">9.034</td>
<td class="gt_row gt_right" headers="stub-10 B">9.247</td>
<td class="gt_row gt_right" headers="stub-10 C">28.154</td>
</tr>
</tbody>
</table>


Wang, dual power and TVaR agree with the monograph to three decimals. **CCoC and PH do not.** For CCoC, prospicio gives the same split as the linear allocation. The premiums and margins are the same as the monograph's. Only the split of capital between units differs.

The cause is the [aggregate](../reference/aggregate.Clash.md#prospicio.aggregate.Clash.aggregate) version. The monograph's code ran on 0.24.0, and 0.30.1 prints its values. 1.0.1 gives prospicio's, and CI checks prospicio against 1.0.1 on InsCo at 1e-10, for both allocations and all five distortions. The monograph's own argument also gives prospicio's CCoC value: every layer of capital earns 15%, so a unit's capital is its margin over 0.15 (unit A: 0.339 / 0.15 = 2.261). Use the premiums and margins, which agree in all versions.


# 6. The reinsurance decision

Chapter 5 asks how a reinsurance cover changes the price of the book. The example is an aggregate stop loss of 35 excess of 65: the reinsurer pays the amount by which the year's total exceeds 65, up to 35. On these ten years it pays in the year of 100 only, so the recovery is 35 with probability 0.1, a mean of 3.5.

Make the net loss and the recovery two units of a new portfolio. It prices the cover and shows what the retained book needs:


``` python
def stop_loss(total, attach=65, limit=35):
    return min(max(total - attach, 0), limit)

split = [[t - stop_loss(t), stop_loss(t)] for t in totals]
reinsured = Portfolio(["Net", "Ceded"], split)
print("means", reinsured.expected(), " (book: net 43.1, ceded 3.5)")
```


    means [43.1, 3.5]  (book: net 43.1, ceded 3.5)


Rows alternate prospicio and Table 9.10:


``` python
BOOK_RE = {  # Table 9.10, premium and margin of ceded and net, (ceded, net)
    "ccoc": ((7.609, 4.109), (45.957, 2.857)),
    "ph": ((6.662, 3.162), (46.903, 3.803)),
    "wang": ((6.087, 2.587), (47.478, 4.378)),
    "dual": ((5.415, 1.915), (48.151, 5.051)),
    "tvar": ((4.803, 1.303), (48.762, 5.662)),
}
book = {family: [*ceded, *net] for family, (ceded, net) in BOOK_RE.items()}
got = {}
for family, d in distortions.items():
    ceded, net = reinsured.price(d, assets=100).allocated[::-1]
    got[family] = [ceded.premium, ceded.premium - ceded.loss, net.premium, net.premium - net.loss]
columns = ["ceded premium", "ceded margin", "net premium", "net margin"]
(GT(with_book(got, book, columns), rowname_col="distortion")
 .tab_header("Stop loss 35 xs 65: ceded and net price", "Table 9.10")
 .fmt_number(columns, decimals=3))
```


<style>
#igqslztvsk table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#igqslztvsk thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#igqslztvsk p { margin: 0; padding: 0; }
 #igqslztvsk .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #igqslztvsk .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #igqslztvsk .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #igqslztvsk .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #igqslztvsk .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #igqslztvsk .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #igqslztvsk .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #igqslztvsk .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #igqslztvsk .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #igqslztvsk .gt_column_spanner_outer:first-child { padding-left: 0; }
 #igqslztvsk .gt_column_spanner_outer:last-child { padding-right: 0; }
 #igqslztvsk .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #igqslztvsk .gt_spanner_row { border-bottom-style: hidden; }
 #igqslztvsk .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #igqslztvsk .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #igqslztvsk .gt_from_md> :first-child { margin-top: 0; }
 #igqslztvsk .gt_from_md> :last-child { margin-bottom: 0; }
 #igqslztvsk .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #igqslztvsk .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #igqslztvsk .gt_indent_1 { text-indent: 5px; }
 #igqslztvsk .gt_indent_2 { text-indent: calc(5px * 2); }
 #igqslztvsk .gt_indent_3 { text-indent: calc(5px * 3); }
 #igqslztvsk .gt_indent_4 { text-indent: calc(5px * 4); }
 #igqslztvsk .gt_indent_5 { text-indent: calc(5px * 5); }
 #igqslztvsk .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #igqslztvsk .gt_row_group_first td { border-top-width: 2px; }
 #igqslztvsk .gt_row_group_first th { border-top-width: 2px; }
 #igqslztvsk .gt_striped { color: #333333; background-color: #F4F4F4; }
 #igqslztvsk .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #igqslztvsk .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #igqslztvsk .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #igqslztvsk .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #igqslztvsk .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #igqslztvsk .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #igqslztvsk .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #igqslztvsk .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #igqslztvsk .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #igqslztvsk .gt_left { text-align: left; }
 #igqslztvsk .gt_center { text-align: center; }
 #igqslztvsk .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #igqslztvsk .gt_font_normal { font-weight: normal; }
 #igqslztvsk .gt_font_bold { font-weight: bold; }
 #igqslztvsk .gt_font_italic { font-style: italic; }
 #igqslztvsk .gt_super { font-size: 65%; }
 #igqslztvsk .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #igqslztvsk .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #igqslztvsk .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #igqslztvsk .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #igqslztvsk .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #igqslztvsk .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="5" id="title" class="gt_heading gt_title gt_font_normal">Stop loss 35 xs 65: ceded and net price</th>
</tr>
<tr class="gt_heading">
<th colspan="5" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.10</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="ceded-premium" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">ceded premium</th>
<th id="ceded-margin" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">ceded margin</th>
<th id="net-premium" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">net premium</th>
<th id="net-margin" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">net margin</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">ccoc</th>
<td class="gt_row gt_right" headers="stub-1 ceded-premium">7.609</td>
<td class="gt_row gt_right" headers="stub-1 ceded-margin">4.109</td>
<td class="gt_row gt_right" headers="stub-1 net-premium">45.957</td>
<td class="gt_row gt_right" headers="stub-1 net-margin">2.857</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">ccoc, book</th>
<td class="gt_row gt_right" headers="stub-2 ceded-premium">7.609</td>
<td class="gt_row gt_right" headers="stub-2 ceded-margin">4.109</td>
<td class="gt_row gt_right" headers="stub-2 net-premium">45.957</td>
<td class="gt_row gt_right" headers="stub-2 net-margin">2.857</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">ph</th>
<td class="gt_row gt_right" headers="stub-3 ceded-premium">6.662</td>
<td class="gt_row gt_right" headers="stub-3 ceded-margin">3.162</td>
<td class="gt_row gt_right" headers="stub-3 net-premium">46.903</td>
<td class="gt_row gt_right" headers="stub-3 net-margin">3.803</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">ph, book</th>
<td class="gt_row gt_right" headers="stub-4 ceded-premium">6.662</td>
<td class="gt_row gt_right" headers="stub-4 ceded-margin">3.162</td>
<td class="gt_row gt_right" headers="stub-4 net-premium">46.903</td>
<td class="gt_row gt_right" headers="stub-4 net-margin">3.803</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">wang</th>
<td class="gt_row gt_right" headers="stub-5 ceded-premium">6.087</td>
<td class="gt_row gt_right" headers="stub-5 ceded-margin">2.587</td>
<td class="gt_row gt_right" headers="stub-5 net-premium">47.478</td>
<td class="gt_row gt_right" headers="stub-5 net-margin">4.378</td>
</tr>
<tr>
<th id="stub-6" class="gt_row gt_left gt_stub" scope="row">wang, book</th>
<td class="gt_row gt_right" headers="stub-6 ceded-premium">6.087</td>
<td class="gt_row gt_right" headers="stub-6 ceded-margin">2.587</td>
<td class="gt_row gt_right" headers="stub-6 net-premium">47.478</td>
<td class="gt_row gt_right" headers="stub-6 net-margin">4.378</td>
</tr>
<tr>
<th id="stub-7" class="gt_row gt_left gt_stub" scope="row">dual</th>
<td class="gt_row gt_right" headers="stub-7 ceded-premium">5.415</td>
<td class="gt_row gt_right" headers="stub-7 ceded-margin">1.915</td>
<td class="gt_row gt_right" headers="stub-7 net-premium">48.151</td>
<td class="gt_row gt_right" headers="stub-7 net-margin">5.051</td>
</tr>
<tr>
<th id="stub-8" class="gt_row gt_left gt_stub" scope="row">dual, book</th>
<td class="gt_row gt_right" headers="stub-8 ceded-premium">5.415</td>
<td class="gt_row gt_right" headers="stub-8 ceded-margin">1.915</td>
<td class="gt_row gt_right" headers="stub-8 net-premium">48.151</td>
<td class="gt_row gt_right" headers="stub-8 net-margin">5.051</td>
</tr>
<tr>
<th id="stub-9" class="gt_row gt_left gt_stub" scope="row">tvar</th>
<td class="gt_row gt_right" headers="stub-9 ceded-premium">4.803</td>
<td class="gt_row gt_right" headers="stub-9 ceded-margin">1.303</td>
<td class="gt_row gt_right" headers="stub-9 net-premium">48.762</td>
<td class="gt_row gt_right" headers="stub-9 net-margin">5.662</td>
</tr>
<tr>
<th id="stub-10" class="gt_row gt_left gt_stub" scope="row">tvar, book</th>
<td class="gt_row gt_right" headers="stub-10 ceded-premium">4.803</td>
<td class="gt_row gt_right" headers="stub-10 ceded-margin">1.303</td>
<td class="gt_row gt_right" headers="stub-10 net-premium">48.762</td>
<td class="gt_row gt_right" headers="stub-10 net-margin">5.662</td>
</tr>
</tbody>
</table>


The cover protects only against the worst year, so its risk load is all tail and its price depends strongly on the distortion. The two margins add up to the book's 6.965 under every distortion, so a dearer cover leaves less margin to the retained book. Chapter 6 asks which distortion is right for the reinsurer's price or the buyer's willingness to pay. The table gives the answer for each.


# 7. A more realistic example

The last section of chapter 9 builds a book from frequency and severity. It has three units, Auto, GL and WC. Each has a lognormal severity with a per-claim limit and a gamma-mixed Poisson count, compounded by FFT. Iman-Conover rank correlation then ties the units together. The monograph prices the book at a 99.5% standard and a 15% return. The units are:


``` python
from prospicio.aggregate import fft
from prospicio.distributions import Count, Grid, Lognormal


def compound_unit(loss, limit, mean, cv, mixing_cv, step, points):
    """A unit: expected loss, a per-claim limit, a lognormal, a gamma mixed count."""
    severity, _ = Grid.local_moment(Lognormal.from_mean_cv(mean, cv), step, points)
    claim, _ = severity.map(lambda x: min(x, limit))
    claims = loss / claim.mean()
    annual, report = fft(Count.mixed_poisson(claims, mixing_cv), claim, points)
    return claims, claim.mean(), annual, report


UNITS = {
    "Auto": (5000.0, 5000.0, 50.0, 2.0, 0.2, 0.25, 2**16),
    "GL": (3000.0, 2500.0, 75.0, 3.0, 0.3, 0.25, 2**16),
    "WC": (7000.0, 25000.0, 5.0, 10.0, 0.25, 0.25, 2**17),
}
annual = {}
rows = []
for name, args in UNITS.items():
    claims, claim_mean, annual[name], report = compound_unit(*args)
    a = annual[name]
    rows.append([name, claims, claim_mean, a.mean(), a.variance() ** 0.5 / a.mean(), f"{report.tail_mass:.1e}"])
columns = ["unit", "claims", "claim mean", "agg mean", "agg cv", "tail mass"]
(GT(pd.DataFrame(rows, columns=columns), rowname_col="unit")
 .tab_header("The three compound units", "Table 9.11")
 .fmt_number("claims", decimals=1, use_seps=False)
 .fmt_number("claim mean", decimals=3)
 .fmt_number("agg mean", decimals=1, use_seps=False)
 .fmt_number("agg cv", decimals=3))
```


<style>
#ktjgemzcby table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#ktjgemzcby thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#ktjgemzcby p { margin: 0; padding: 0; }
 #ktjgemzcby .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #ktjgemzcby .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #ktjgemzcby .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #ktjgemzcby .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #ktjgemzcby .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #ktjgemzcby .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ktjgemzcby .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #ktjgemzcby .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #ktjgemzcby .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #ktjgemzcby .gt_column_spanner_outer:first-child { padding-left: 0; }
 #ktjgemzcby .gt_column_spanner_outer:last-child { padding-right: 0; }
 #ktjgemzcby .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #ktjgemzcby .gt_spanner_row { border-bottom-style: hidden; }
 #ktjgemzcby .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #ktjgemzcby .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #ktjgemzcby .gt_from_md> :first-child { margin-top: 0; }
 #ktjgemzcby .gt_from_md> :last-child { margin-bottom: 0; }
 #ktjgemzcby .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #ktjgemzcby .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #ktjgemzcby .gt_indent_1 { text-indent: 5px; }
 #ktjgemzcby .gt_indent_2 { text-indent: calc(5px * 2); }
 #ktjgemzcby .gt_indent_3 { text-indent: calc(5px * 3); }
 #ktjgemzcby .gt_indent_4 { text-indent: calc(5px * 4); }
 #ktjgemzcby .gt_indent_5 { text-indent: calc(5px * 5); }
 #ktjgemzcby .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #ktjgemzcby .gt_row_group_first td { border-top-width: 2px; }
 #ktjgemzcby .gt_row_group_first th { border-top-width: 2px; }
 #ktjgemzcby .gt_striped { color: #333333; background-color: #F4F4F4; }
 #ktjgemzcby .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ktjgemzcby .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ktjgemzcby .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #ktjgemzcby .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ktjgemzcby .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ktjgemzcby .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #ktjgemzcby .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #ktjgemzcby .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #ktjgemzcby .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ktjgemzcby .gt_left { text-align: left; }
 #ktjgemzcby .gt_center { text-align: center; }
 #ktjgemzcby .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #ktjgemzcby .gt_font_normal { font-weight: normal; }
 #ktjgemzcby .gt_font_bold { font-weight: bold; }
 #ktjgemzcby .gt_font_italic { font-style: italic; }
 #ktjgemzcby .gt_super { font-size: 65%; }
 #ktjgemzcby .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #ktjgemzcby .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #ktjgemzcby .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #ktjgemzcby .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ktjgemzcby .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #ktjgemzcby .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="6" id="title" class="gt_heading gt_title gt_font_normal">The three compound units</th>
</tr>
<tr class="gt_heading">
<th colspan="6" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Table 9.11</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="claims" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">claims</th>
<th id="claim-mean" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">claim mean</th>
<th id="agg-mean" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">agg mean</th>
<th id="agg-cv" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">agg cv</th>
<th id="tail-mass" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col">tail mass</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">Auto</th>
<td class="gt_row gt_right" headers="stub-1 claims">100.0</td>
<td class="gt_row gt_right" headers="stub-1 claim-mean">49.982</td>
<td class="gt_row gt_right" headers="stub-1 agg-mean">5000.0</td>
<td class="gt_row gt_right" headers="stub-1 agg-cv">0.298</td>
<td class="gt_row gt_left" headers="stub-1 tail-mass">2.3e-06</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">GL</th>
<td class="gt_row gt_right" headers="stub-2 claims">41.0</td>
<td class="gt_row gt_right" headers="stub-2 claim-mean">73.156</td>
<td class="gt_row gt_right" headers="stub-2 agg-mean">3000.0</td>
<td class="gt_row gt_right" headers="stub-2 agg-cv">0.502</td>
<td class="gt_row gt_left" headers="stub-2 tail-mass">4.4e-07</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">WC</th>
<td class="gt_row gt_right" headers="stub-3 claims">1401.1</td>
<td class="gt_row gt_right" headers="stub-3 claim-mean">4.996</td>
<td class="gt_row gt_right" headers="stub-3 agg-mean">6999.7</td>
<td class="gt_row gt_right" headers="stub-3 agg-cv">0.349</td>
<td class="gt_row gt_left" headers="stub-3 tail-mass">1.6e-04</td>
</tr>
</tbody>
</table>


Table 9.11 prints the same values (41.008 claims for GL, and 4.945 for WC's claim mean on its grid). Unit WC drives the tail, with a thick-tailed severity and a high limit.

Iman-Conover pairs the units' draws so that their rank correlations match a target, and leaves each unit's distribution unchanged. Three steps:

1.  Draw each unit at evenly spaced quantiles.
2.  Tie the draws with the monograph's matrix (Table 9.12).
3.  Build a portfolio from the result.


``` python
from prospicio.distributions import PredictiveDistribution
from prospicio.risk import iman_conover

TARGET = [[1.0, 0.5, 0.4], [0.5, 1.0, 0.1], [0.4, 0.1, 1.0]]


def correlated_portfolio(n_sims, seed):
    draws = {k: [g.quantile((i + 0.5) / n_sims) for i in range(n_sims)] for k, g in annual.items()}
    rows = [[draws[k][i] for k in UNITS] for i in range(n_sims)]
    keys = [(k,) for k in UNITS]
    joint = iman_conover(PredictiveDistribution(["unit"], keys, rows), TARGET, seed)
    return Portfolio.from_predictive(joint)


book = correlated_portfolio(50_000, 4817)
print("units", book.units, " means", [round(m, 1) for m in book.expected()])
```


    units ['Auto', 'GL', 'WC']  means [5000.0, 3000.0, 6999.7]


Now calibrate the five distortions to a 15% return at the 99.5% standard and price each unit:


``` python
BOOK_PARAMS = {"ccoc": 0.150, "ph": 0.654, "wang": 0.437, "dual": 1.756, "tvar": 0.299}
priced_book, params = {}, {}
for family in FAMILIES:
    d = book.calibrate(family, p=0.995, return_on_capital=0.15)
    priced_book[family] = book.price(d, p=0.995)
    ((_, params[family]),) = d.parameters.items()
print(f"assets at 99.5%: {book.assets(0.995):,.0f}   (book 28,898)")
```


    assets at 99.5%: 28,448   (book 28,898)


The table is Tables 9.16 (parameters) and 9.17 (premiums):


``` python
rows = [
    [family, params[family], BOOK_PARAMS[family],
     *[u.premium for u in priced_book[family].allocated], priced_book[family].total.premium]
    for family in FAMILIES
]
columns = ["distortion", "parameter", "book parameter", "Auto", "GL", "WC", "total"]
(GT(pd.DataFrame(rows, columns=columns), rowname_col="distortion")
 .tab_header("The correlated book at 99.5%, 15% return", "Premium by unit")
 .fmt_number(["parameter", "book parameter"], decimals=3)
 .fmt_number(["Auto", "GL", "WC"], decimals=1, use_seps=False)
 .fmt_number("total", decimals=1))
```


<style>
#wpnsbbigtx table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#wpnsbbigtx thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#wpnsbbigtx p { margin: 0; padding: 0; }
 #wpnsbbigtx .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #wpnsbbigtx .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #wpnsbbigtx .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #wpnsbbigtx .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #wpnsbbigtx .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #wpnsbbigtx .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #wpnsbbigtx .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #wpnsbbigtx .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #wpnsbbigtx .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #wpnsbbigtx .gt_column_spanner_outer:first-child { padding-left: 0; }
 #wpnsbbigtx .gt_column_spanner_outer:last-child { padding-right: 0; }
 #wpnsbbigtx .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #wpnsbbigtx .gt_spanner_row { border-bottom-style: hidden; }
 #wpnsbbigtx .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #wpnsbbigtx .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #wpnsbbigtx .gt_from_md> :first-child { margin-top: 0; }
 #wpnsbbigtx .gt_from_md> :last-child { margin-bottom: 0; }
 #wpnsbbigtx .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #wpnsbbigtx .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #wpnsbbigtx .gt_indent_1 { text-indent: 5px; }
 #wpnsbbigtx .gt_indent_2 { text-indent: calc(5px * 2); }
 #wpnsbbigtx .gt_indent_3 { text-indent: calc(5px * 3); }
 #wpnsbbigtx .gt_indent_4 { text-indent: calc(5px * 4); }
 #wpnsbbigtx .gt_indent_5 { text-indent: calc(5px * 5); }
 #wpnsbbigtx .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #wpnsbbigtx .gt_row_group_first td { border-top-width: 2px; }
 #wpnsbbigtx .gt_row_group_first th { border-top-width: 2px; }
 #wpnsbbigtx .gt_striped { color: #333333; background-color: #F4F4F4; }
 #wpnsbbigtx .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #wpnsbbigtx .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #wpnsbbigtx .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #wpnsbbigtx .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #wpnsbbigtx .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #wpnsbbigtx .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #wpnsbbigtx .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #wpnsbbigtx .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #wpnsbbigtx .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #wpnsbbigtx .gt_left { text-align: left; }
 #wpnsbbigtx .gt_center { text-align: center; }
 #wpnsbbigtx .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #wpnsbbigtx .gt_font_normal { font-weight: normal; }
 #wpnsbbigtx .gt_font_bold { font-weight: bold; }
 #wpnsbbigtx .gt_font_italic { font-style: italic; }
 #wpnsbbigtx .gt_super { font-size: 65%; }
 #wpnsbbigtx .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #wpnsbbigtx .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #wpnsbbigtx .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #wpnsbbigtx .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #wpnsbbigtx .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #wpnsbbigtx .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="7" id="title" class="gt_heading gt_title gt_font_normal">The correlated book at 99.5%, 15% return</th>
</tr>
<tr class="gt_heading">
<th colspan="7" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Premium by unit</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="parameter" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">parameter</th>
<th id="book-parameter" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">book parameter</th>
<th id="Auto" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">Auto</th>
<th id="GL" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">GL</th>
<th id="WC" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">WC</th>
<th id="total" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">total</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">ccoc</th>
<td class="gt_row gt_right" headers="stub-1 parameter">0.150</td>
<td class="gt_row gt_right" headers="stub-1 book-parameter">0.150</td>
<td class="gt_row gt_right" headers="stub-1 Auto">5351.0</td>
<td class="gt_row gt_right" headers="stub-1 GL">3230.1</td>
<td class="gt_row gt_right" headers="stub-1 WC">8154.6</td>
<td class="gt_row gt_right" headers="stub-1 total">16,735.8</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">ph</th>
<td class="gt_row gt_right" headers="stub-2 parameter">0.654</td>
<td class="gt_row gt_right" headers="stub-2 book-parameter">0.654</td>
<td class="gt_row gt_right" headers="stub-2 Auto">5483.4</td>
<td class="gt_row gt_right" headers="stub-2 GL">3377.8</td>
<td class="gt_row gt_right" headers="stub-2 WC">7874.6</td>
<td class="gt_row gt_right" headers="stub-2 total">16,735.8</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">wang</th>
<td class="gt_row gt_right" headers="stub-3 parameter">0.434</td>
<td class="gt_row gt_right" headers="stub-3 book-parameter">0.437</td>
<td class="gt_row gt_right" headers="stub-3 Auto">5511.0</td>
<td class="gt_row gt_right" headers="stub-3 GL">3405.1</td>
<td class="gt_row gt_right" headers="stub-3 WC">7819.6</td>
<td class="gt_row gt_right" headers="stub-3 total">16,735.8</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">dual</th>
<td class="gt_row gt_right" headers="stub-4 parameter">1.740</td>
<td class="gt_row gt_right" headers="stub-4 book-parameter">1.756</td>
<td class="gt_row gt_right" headers="stub-4 Auto">5529.0</td>
<td class="gt_row gt_right" headers="stub-4 GL">3421.1</td>
<td class="gt_row gt_right" headers="stub-4 WC">7785.6</td>
<td class="gt_row gt_right" headers="stub-4 total">16,735.8</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">tvar</th>
<td class="gt_row gt_right" headers="stub-5 parameter">0.291</td>
<td class="gt_row gt_right" headers="stub-5 book-parameter">0.299</td>
<td class="gt_row gt_right" headers="stub-5 Auto">5536.0</td>
<td class="gt_row gt_right" headers="stub-5 GL">3423.9</td>
<td class="gt_row gt_right" headers="stub-5 WC">7776.0</td>
<td class="gt_row gt_right" headers="stub-5 total">16,735.8</td>
</tr>
</tbody>
</table>


The parameters are within about 0.01 of the monograph's, and the total premium of about 16,740 is close to its 16,800.3. Exact agreement is not expected: the monograph's 1,000 simulations put its 99.5% quantile on five points, and the draws here are 50,000 and evenly spaced. The table repeats the CCoC calculation on other sample sizes:


``` python
rows = []
for n_sims, seed in ((1_000, 11), (1_000, 12), (10_000, 11), (50_000, 11)):
    pf = correlated_portfolio(n_sims, seed)
    d = pf.calibrate("ccoc", p=0.995, return_on_capital=0.15)
    p = pf.price(d, p=0.995)
    rows.append([f"{n_sims}, seed {seed}", p.total.assets, p.total.premium])
(GT(pd.DataFrame(rows, columns=["simulations", "assets", "premium"]), rowname_col="simulations")
 .tab_header("CCoC price of the correlated book by sample size", "99.5% standard, 15% return")
 .fmt_number("assets", decimals=0)
 .fmt_number("premium", decimals=1))
```


<style>
#nljsllofvc table {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

#nljsllofvc thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#nljsllofvc p { margin: 0; padding: 0; }
 #nljsllofvc .gt_table { display: table; border-collapse: collapse; line-height: normal; margin-left: auto; margin-right: auto; color: #333333; font-size: 16px; font-weight: normal; font-style: normal; background-color: #FFFFFF; width: auto; border-top-style: solid; border-top-width: 2px; border-top-color: #A8A8A8; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #A8A8A8; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; }
 #nljsllofvc .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #nljsllofvc .gt_title { color: #333333; font-size: 125%; font-weight: initial; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; border-bottom-color: #FFFFFF; border-bottom-width: 0; }
 #nljsllofvc .gt_subtitle { color: #333333; font-size: 85%; font-weight: initial; padding-top: 3px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-top-color: #FFFFFF; border-top-width: 0; }
 #nljsllofvc .gt_heading { background-color: #FFFFFF; text-align: center; border-bottom-color: #FFFFFF; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #nljsllofvc .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #nljsllofvc .gt_col_headings { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; }
 #nljsllofvc .gt_col_heading { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; overflow-x: hidden; }
 #nljsllofvc .gt_column_spanner_outer { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: normal; text-transform: inherit; padding-top: 0; padding-bottom: 0; padding-left: 4px; padding-right: 4px; }
 #nljsllofvc .gt_column_spanner_outer:first-child { padding-left: 0; }
 #nljsllofvc .gt_column_spanner_outer:last-child { padding-right: 0; }
 #nljsllofvc .gt_column_spanner { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: bottom; padding-top: 5px; padding-bottom: 5px; overflow-x: hidden; display: inline-block; width: 100%; }
 #nljsllofvc .gt_spanner_row { border-bottom-style: hidden; }
 #nljsllofvc .gt_group_heading { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; text-align: left; }
 #nljsllofvc .gt_empty_group_heading { padding: 0.5px; color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; vertical-align: middle; }
 #nljsllofvc .gt_from_md> :first-child { margin-top: 0; }
 #nljsllofvc .gt_from_md> :last-child { margin-bottom: 0; }
 #nljsllofvc .gt_row { padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; margin: 10px; border-top-style: solid; border-top-width: 1px; border-top-color: #D3D3D3; border-left-style: none; border-left-width: 1px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 1px; border-right-color: #D3D3D3; vertical-align: middle; overflow-x: hidden; }
 #nljsllofvc .gt_stub { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; }
 #nljsllofvc .gt_indent_1 { text-indent: 5px; }
 #nljsllofvc .gt_indent_2 { text-indent: calc(5px * 2); }
 #nljsllofvc .gt_indent_3 { text-indent: calc(5px * 3); }
 #nljsllofvc .gt_indent_4 { text-indent: calc(5px * 4); }
 #nljsllofvc .gt_indent_5 { text-indent: calc(5px * 5); }
 #nljsllofvc .gt_stub_row_group { color: #333333; background-color: #FFFFFF; font-size: 100%; font-weight: initial; text-transform: inherit; border-right-style: solid; border-right-width: 2px; border-right-color: #D3D3D3; padding-left: 5px; padding-right: 5px; vertical-align: top; }
 #nljsllofvc .gt_row_group_first td { border-top-width: 2px; }
 #nljsllofvc .gt_row_group_first th { border-top-width: 2px; }
 #nljsllofvc .gt_striped { color: #333333; background-color: #F4F4F4; }
 #nljsllofvc .gt_table_body { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #nljsllofvc .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #nljsllofvc .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #nljsllofvc .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #nljsllofvc .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #nljsllofvc .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #nljsllofvc .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #nljsllofvc .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #nljsllofvc .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #nljsllofvc .gt_left { text-align: left; }
 #nljsllofvc .gt_center { text-align: center; }
 #nljsllofvc .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #nljsllofvc .gt_font_normal { font-weight: normal; }
 #nljsllofvc .gt_font_bold { font-weight: bold; }
 #nljsllofvc .gt_font_italic { font-style: italic; }
 #nljsllofvc .gt_super { font-size: 65%; }
 #nljsllofvc .gt_footnotes { color: font-color(#FFFFFF); background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #nljsllofvc .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #nljsllofvc .gt_sourcenotes { color: #333333; background-color: #FFFFFF; border-bottom-style: none; border-bottom-width: 2px; border-bottom-color: #D3D3D3; border-left-style: none; border-left-width: 2px; border-left-color: #D3D3D3; border-right-style: none; border-right-width: 2px; border-right-color: #D3D3D3; }
 #nljsllofvc .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #nljsllofvc .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #nljsllofvc .gt_asterisk { font-size: 100%; vertical-align: 0; }
 
</style>

<table class="gt_table" aria-labelledby="title" aria-describedby="subtitle" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="3" id="title" class="gt_heading gt_title gt_font_normal">CCoC price of the correlated book by sample size</th>
</tr>
<tr class="gt_heading">
<th colspan="3" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">99.5% standard, 15% return</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="assets" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">assets</th>
<th id="premium" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">premium</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">1000, seed 11</th>
<td class="gt_row gt_right" headers="stub-1 assets">27,850</td>
<td class="gt_row gt_right" headers="stub-1 premium">16,657.6</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">1000, seed 12</th>
<td class="gt_row gt_right" headers="stub-2 assets">29,368</td>
<td class="gt_row gt_right" headers="stub-2 premium">16,855.1</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">10000, seed 11</th>
<td class="gt_row gt_right" headers="stub-3 assets">28,692</td>
<td class="gt_row gt_right" headers="stub-3 premium">16,771.1</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">50000, seed 11</th>
<td class="gt_row gt_right" headers="stub-4 assets">28,520</td>
<td class="gt_row gt_right" headers="stub-4 premium">16,744.9</td>
</tr>
</tbody>
</table>


The premium moves by one or two percent between two samples of 1,000. Do not quote a small sample to four digits; use more simulations and a capital standard that you can defend.


# 8. Related guides

- [Chapters 1, 2 and 7](capital-modeling-monograph-15-practice.md): the charter of a capital model, business operations, reinsurance, capital structure, pro formas and the evaluation of models.
- [Chapters 3 and 4](capital-modeling-monograph-15-theory.md) and [chapters 5 and 6](capital-modeling-monograph-15-applications.md), table by table: capital adequacy, pricing and allocation, applications and the choice of a distortion.
- [Chapter 8](capital-modeling-monograph-15-iman-conover.md): uncertainty, Iman-Conover, capital by layer and Bodoff's allocation (Table 8.12 from [Portfolio.bodoff](../reference/pricing.Portfolio.md#prospicio.pricing.Portfolio.bodoff)).
- [Risk loads and distortions](risk-loads-and-distortions.md): which distortion to use, and how to calibrate it to a quote.
- [Aggregate distributions](aggregate-distributions.md): the compound distributions of section 7.
- [prospicio for aggregate users](prospicio-for-aggregate-users.md): the package behind the monograph's code.
