# Applications and the choice of a distortion: CAS Monograph 15, chapters 5 and 6

CAS Monograph 15 is *Introduction to Capital Modeling and Portfolio Management* (John Major and Stephen Mildenhall, 2026). Chapters 5 and 6 apply the natural allocation to the InsCo example. This guide recomputes their tables with prospicio and shows the monograph's value beside prospicio's. Table numbers are the monograph's.

[Capital adequacy and the natural allocation](capital-modeling-monograph-15-theory.md) builds the method in chapters 3 and 4. [Capital modeling and portfolio pricing](capital-modeling-monograph-15.md) reproduces chapter 9.


# 1. The book and its target

InsCo has three units over ten equally likely years, plan premiums of 13.9, 18.7 and 19.6, and assets of 100. Investors want a return of 15% on capital. That needs a premium of 53.565, against a plan of 52.2. Chapter 5 allocates the required premium with a Wang distortion calibrated to it. Chapter 6 uses all five representative families:


``` python
from prospicio.distributions import Sampled
from prospicio.pricing import Pentagon, Portfolio
from prospicio.risk import Distortion

UNITS = ["A", "B", "C"]
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],
]
PLAN = [13.9, 18.7, 19.6]
insco = Portfolio(UNITS, ROWS)
totals = [float(sum(row)) for row in ROWS]

FAMILIES = ["ccoc", "ph", "wang", "dual", "tvar"]
distortions = {f: insco.calibrate(f, assets=100, return_on_capital=0.15) for f in FAMILIES}
wang = distortions["wang"]
required = insco.price(wang, assets=100)
print(f"required premium {required.total.premium:.3f}, plan {sum(PLAN):.1f}")
```


    required premium 53.565, plan 52.2


# 2. Performance assessment

Section 5.1 asks which units meet the target. The portfolio's shortfall of 1.365 is the same under every calibrated distortion. The split over the units is not. With Wang (Tables 5.1 and 5.2), the excess loss ratio is the loss ratio at the required premium less the plan's:


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

NAN = float("nan")


def pair_table(frame, places, percent=()):
    """Rows labelled ", book" are the monograph's, shown as printed; the others at fixed decimals."""
    book = [i for i, label in enumerate(frame.iloc[:, 0]) if label.endswith(", book")]
    mine = [i for i in range(len(frame)) if i not in book]
    table = GT(frame, rowname_col=frame.columns[0])
    for column, n in places.items():
        fmt = "fmt_percent" if column in percent else "fmt_number"
        table = getattr(table, fmt)(column, rows=mine, decimals=n, use_seps=False)
        table = getattr(table, fmt)(column, rows=book, decimals=n, drop_trailing_zeros=True, use_seps=False)
    return table.sub_missing(missing_text="")


BOOK_52 = {  # Tables 5.1 and 5.2: Wang premium, excess, excess as share of plan margin, excess loss ratio
    "A": (14.109, -0.209, -0.418, -0.0143), "B": (18.637, 0.063, 0.156, 0.0033),
    "C": (20.819, -1.219, -0.259, -0.0445),
}
rows = []
for u, plan, unit in zip(UNITS, PLAN, required.allocated):
    excess = plan - unit.premium
    rows.append((u, plan, unit.premium, excess, excess / (plan - unit.loss),
                 unit.loss / unit.premium - unit.loss / plan))
    rows.append((u + ", book", NAN, *BOOK_52[u]))
gross_excess = sum(PLAN) - required.total.premium
rows.append(("total", sum(PLAN), required.total.premium, gross_excess,
             gross_excess / (sum(PLAN) - 46.6), NAN))
rows.append(("total, book", NAN, NAN, -1.365, -0.244, NAN))
perf = pd.DataFrame(rows, columns=["unit", "plan", "wang", "excess", "of_plan", "lr"])
(pair_table(perf, {"plan": 1, "wang": 3, "excess": 3, "of_plan": 1, "lr": 2}, percent=("of_plan", "lr"))
 .tab_header("Table 5.2: plan premium against the required premium under Wang",
             "Premium in currency units; excess = plan less Wang")
 .cols_label(plan="plan", wang="Wang", excess="excess", of_plan="% of plan margin",
             lr="excess loss ratio"))
```


<style>
#ujnfiqnixr 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;
        }

#ujnfiqnixr thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#ujnfiqnixr p { margin: 0; padding: 0; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_column_spanner_outer:first-child { padding-left: 0; }
 #ujnfiqnixr .gt_column_spanner_outer:last-child { padding-right: 0; }
 #ujnfiqnixr .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%; }
 #ujnfiqnixr .gt_spanner_row { border-bottom-style: hidden; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_from_md> :first-child { margin-top: 0; }
 #ujnfiqnixr .gt_from_md> :last-child { margin-bottom: 0; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_indent_1 { text-indent: 5px; }
 #ujnfiqnixr .gt_indent_2 { text-indent: calc(5px * 2); }
 #ujnfiqnixr .gt_indent_3 { text-indent: calc(5px * 3); }
 #ujnfiqnixr .gt_indent_4 { text-indent: calc(5px * 4); }
 #ujnfiqnixr .gt_indent_5 { text-indent: calc(5px * 5); }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_row_group_first td { border-top-width: 2px; }
 #ujnfiqnixr .gt_row_group_first th { border-top-width: 2px; }
 #ujnfiqnixr .gt_striped { color: #333333; background-color: #F4F4F4; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ujnfiqnixr .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #ujnfiqnixr .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ujnfiqnixr .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ujnfiqnixr .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #ujnfiqnixr .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ujnfiqnixr .gt_left { text-align: left; }
 #ujnfiqnixr .gt_center { text-align: center; }
 #ujnfiqnixr .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #ujnfiqnixr .gt_font_normal { font-weight: normal; }
 #ujnfiqnixr .gt_font_bold { font-weight: bold; }
 #ujnfiqnixr .gt_font_italic { font-style: italic; }
 #ujnfiqnixr .gt_super { font-size: 65%; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #ujnfiqnixr .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; }
 #ujnfiqnixr .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ujnfiqnixr .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #ujnfiqnixr .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">Table 5.2: plan premium against the required premium under Wang</th>
</tr>
<tr class="gt_heading">
<th colspan="6" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Premium in currency units; excess = plan less Wang</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="plan" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">plan</th>
<th id="wang" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">Wang</th>
<th id="excess" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">excess</th>
<th id="of_plan" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">% of plan margin</th>
<th id="lr" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">excess loss ratio</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 plan">13.9</td>
<td class="gt_row gt_right" headers="stub-1 wang">14.109</td>
<td class="gt_row gt_right" headers="stub-1 excess">−0.209</td>
<td class="gt_row gt_right" headers="stub-1 of_plan">−41.8%</td>
<td class="gt_row gt_right" headers="stub-1 lr">−1.43%</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">A, book</th>
<td class="gt_row gt_right" headers="stub-2 plan"></td>
<td class="gt_row gt_right" headers="stub-2 wang">14.109</td>
<td class="gt_row gt_right" headers="stub-2 excess">−0.209</td>
<td class="gt_row gt_right" headers="stub-2 of_plan">−41.8%</td>
<td class="gt_row gt_right" headers="stub-2 lr">−1.43%</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">B</th>
<td class="gt_row gt_right" headers="stub-3 plan">18.7</td>
<td class="gt_row gt_right" headers="stub-3 wang">18.637</td>
<td class="gt_row gt_right" headers="stub-3 excess">0.063</td>
<td class="gt_row gt_right" headers="stub-3 of_plan">15.6%</td>
<td class="gt_row gt_right" headers="stub-3 lr">0.33%</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">B, book</th>
<td class="gt_row gt_right" headers="stub-4 plan"></td>
<td class="gt_row gt_right" headers="stub-4 wang">18.637</td>
<td class="gt_row gt_right" headers="stub-4 excess">0.063</td>
<td class="gt_row gt_right" headers="stub-4 of_plan">15.6%</td>
<td class="gt_row gt_right" headers="stub-4 lr">0.33%</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">C</th>
<td class="gt_row gt_right" headers="stub-5 plan">19.6</td>
<td class="gt_row gt_right" headers="stub-5 wang">20.819</td>
<td class="gt_row gt_right" headers="stub-5 excess">−1.219</td>
<td class="gt_row gt_right" headers="stub-5 of_plan">−25.9%</td>
<td class="gt_row gt_right" headers="stub-5 lr">−4.45%</td>
</tr>
<tr>
<th id="stub-6" class="gt_row gt_left gt_stub" scope="row">C, book</th>
<td class="gt_row gt_right" headers="stub-6 plan"></td>
<td class="gt_row gt_right" headers="stub-6 wang">20.819</td>
<td class="gt_row gt_right" headers="stub-6 excess">−1.219</td>
<td class="gt_row gt_right" headers="stub-6 of_plan">−25.9%</td>
<td class="gt_row gt_right" headers="stub-6 lr">−4.45%</td>
</tr>
<tr>
<th id="stub-7" class="gt_row gt_left gt_stub" scope="row">total</th>
<td class="gt_row gt_right" headers="stub-7 plan">52.2</td>
<td class="gt_row gt_right" headers="stub-7 wang">53.565</td>
<td class="gt_row gt_right" headers="stub-7 excess">−1.365</td>
<td class="gt_row gt_right" headers="stub-7 of_plan">−24.4%</td>
<td class="gt_row gt_right" headers="stub-7 lr"></td>
</tr>
<tr>
<th id="stub-8" class="gt_row gt_left gt_stub" scope="row">total, book</th>
<td class="gt_row gt_right" headers="stub-8 plan"></td>
<td class="gt_row gt_right" headers="stub-8 wang"></td>
<td class="gt_row gt_right" headers="stub-8 excess">−1.365</td>
<td class="gt_row gt_right" headers="stub-8 of_plan">−24.4%</td>
<td class="gt_row gt_right" headers="stub-8 lr"></td>
</tr>
</tbody>
</table>


Only unit B's plan meets its target. Unit C has most of the deficit in money. Unit A is furthest off relative to its own margin: its plan margin of 0.5 must rise by 42%. This holds for Wang only. Section 8 shows other distortions.


# 3. Reinsurance decision-making

Section 5.2 considers an aggregate stop loss of 35 excess of 65 at a premium of 6.5. It pays 35 in the worst year only (expected loss 3.5). Two ways of judging it give opposite answers.

The first prices the net portfolio alone with the pentagon. The cover cuts the assets needed from 100 to 65, so the net premium at 15% is 7.609 less than gross. That saves more than the cost of 6.5, so buy it:


``` python
gross = Pentagon.solve(loss=46.6, assets=100.0, return_on_capital=0.15)
net = Pentagon.solve(loss=43.1, assets=65.0, return_on_capital=0.15)
saving = gross.premium - net.premium
print(f"net premium {net.premium:.4f} (book 45.956), saving {saving:.3f} (book 7.609), cover costs 6.5")
print(f"cover: loss on line {3.5 / 35:.0%}, rate on line {6.5 / 35:.1%} (book 10%, 18.6%)")
```


    net premium 45.9565 (book 45.956), saving 7.609 (book 7.609), cover costs 6.5
    cover: loss on line 10%, rate on line 18.6% (book 10%, 18.6%)


The monograph rounds the discount factors to five decimals (0.86956 and 0.13043), which gives 45.956 where the unrounded premium is 45.9565.

That method assumes the net portfolio still costs 15% of its capital. But the cover removes the top layer of capital, the cheapest under every distortion except the CCoC. The second method prices the cover and the net portfolio as two units of one portfolio under Wang:


``` python
def stop_loss(t, attach=65.0, limit=35.0):
    return min(max(t - attach, 0.0), limit)


split = Portfolio(["net", "ceded"], [[t - stop_loss(t), stop_loss(t)] for t in totals])
net_unit, ceded_unit = split.price(wang, assets=100).allocated
print(f"ceded: loss {ceded_unit.loss:.3f}, Wang premium {ceded_unit.premium:.3f} (book 6.087), "
      f"quoted 6.5")
net_return = (net_unit.premium - net_unit.loss) / (65.0 - net_unit.premium)
print(f"net: premium {net_unit.premium:.3f} (book 47.478), return on 65 of assets "
      f"{net_return:.1%} (book 25%)")
```


    ceded: loss 3.500, Wang premium 6.087 (book 6.087), quoted 6.5
    net: premium 47.478 (book 47.478), return on 65 of assets 25.0% (book 25%)


Under Wang the cover is worth 6.087 and costs 6.5, so do not buy it. The net portfolio earns 25%, more than 15%, because its remaining capital is the most likely to be used and so the most expensive. Section 9 gives the cover's value under all five distortions.


# 4. New business pricing

Section 5.3 prices a small new account, too small to change the order of the years. It is priced as a fourth unit with the current Wang weights [q](../reference/reserving.MunichFit.md#prospicio.reserving.MunichFit.q). The monograph regresses the account's simulated losses on the portfolio total (LOWESS). Those losses are not printed, so this guide starts from the conditional means at the seven totals (Table 5.3):


``` python
NEW = [0.02028, 0.01965, 0.01849, 0.01855, 0.02402, 0.02910, 0.06339]  # Table 5.3, at each total
Q_BOOK = [0.0522, 0.0660, 0.0748, 0.3791, 0.1190, 0.1350, 0.1739]      # the Wang q, Table 5.3


def wang_q(g, probs):
    s, gs = 1.0, [1.0]
    for p in probs:
        s -= p
        gs.append(g.g(s) if s > 1e-12 else 0.0)
    return [gs[j] - gs[j + 1] for j in range(len(probs))]


qw = wang_q(wang, insco.probs)
states = [str(int(t)) for t in sorted(set(totals))]
table_53 = pd.DataFrame({"total": states, "prob": list(insco.probs), "new": NEW, "q": qw, "q_book": Q_BOOK})
(GT(table_53, rowname_col="total")
 .tab_header("Table 5.3: the new account's conditional mean and the Wang weights",
             "Rows are the seven portfolio totals")
 .cols_label(prob="probability", new="account loss", q="q", q_book="q, book")
 .fmt_number(["prob"], decimals=1)
 .fmt_number(["new"], decimals=5)
 .fmt_number(["q", "q_book"], decimals=4))
```


<style>
#zzrvpuhiml 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;
        }

#zzrvpuhiml thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#zzrvpuhiml p { margin: 0; padding: 0; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_column_spanner_outer:first-child { padding-left: 0; }
 #zzrvpuhiml .gt_column_spanner_outer:last-child { padding-right: 0; }
 #zzrvpuhiml .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%; }
 #zzrvpuhiml .gt_spanner_row { border-bottom-style: hidden; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_from_md> :first-child { margin-top: 0; }
 #zzrvpuhiml .gt_from_md> :last-child { margin-bottom: 0; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_indent_1 { text-indent: 5px; }
 #zzrvpuhiml .gt_indent_2 { text-indent: calc(5px * 2); }
 #zzrvpuhiml .gt_indent_3 { text-indent: calc(5px * 3); }
 #zzrvpuhiml .gt_indent_4 { text-indent: calc(5px * 4); }
 #zzrvpuhiml .gt_indent_5 { text-indent: calc(5px * 5); }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_row_group_first td { border-top-width: 2px; }
 #zzrvpuhiml .gt_row_group_first th { border-top-width: 2px; }
 #zzrvpuhiml .gt_striped { color: #333333; background-color: #F4F4F4; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #zzrvpuhiml .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #zzrvpuhiml .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #zzrvpuhiml .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #zzrvpuhiml .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #zzrvpuhiml .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #zzrvpuhiml .gt_left { text-align: left; }
 #zzrvpuhiml .gt_center { text-align: center; }
 #zzrvpuhiml .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #zzrvpuhiml .gt_font_normal { font-weight: normal; }
 #zzrvpuhiml .gt_font_bold { font-weight: bold; }
 #zzrvpuhiml .gt_font_italic { font-style: italic; }
 #zzrvpuhiml .gt_super { font-size: 65%; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #zzrvpuhiml .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; }
 #zzrvpuhiml .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #zzrvpuhiml .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #zzrvpuhiml .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">Table 5.3: the new account's conditional mean and the Wang weights</th>
</tr>
<tr class="gt_heading">
<th colspan="5" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Rows are the seven portfolio totals</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="prob" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">probability</th>
<th id="new" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">account loss</th>
<th id="q" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">q</th>
<th id="q_book" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">q, book</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 prob">0.1</td>
<td class="gt_row gt_right" headers="stub-1 new">0.02028</td>
<td class="gt_row gt_right" headers="stub-1 q">0.0522</td>
<td class="gt_row gt_right" headers="stub-1 q_book">0.0522</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 prob">0.1</td>
<td class="gt_row gt_right" headers="stub-2 new">0.01965</td>
<td class="gt_row gt_right" headers="stub-2 q">0.0660</td>
<td class="gt_row gt_right" headers="stub-2 q_book">0.0660</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 prob">0.1</td>
<td class="gt_row gt_right" headers="stub-3 new">0.01849</td>
<td class="gt_row gt_right" headers="stub-3 q">0.0748</td>
<td class="gt_row gt_right" headers="stub-3 q_book">0.0748</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 prob">0.4</td>
<td class="gt_row gt_right" headers="stub-4 new">0.01855</td>
<td class="gt_row gt_right" headers="stub-4 q">0.3791</td>
<td class="gt_row gt_right" headers="stub-4 q_book">0.3791</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 prob">0.1</td>
<td class="gt_row gt_right" headers="stub-5 new">0.02402</td>
<td class="gt_row gt_right" headers="stub-5 q">0.1190</td>
<td class="gt_row gt_right" headers="stub-5 q_book">0.1190</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 prob">0.1</td>
<td class="gt_row gt_right" headers="stub-6 new">0.02910</td>
<td class="gt_row gt_right" headers="stub-6 q">0.1350</td>
<td class="gt_row gt_right" headers="stub-6 q_book">0.1350</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 prob">0.1</td>
<td class="gt_row gt_right" headers="stub-7 new">0.06339</td>
<td class="gt_row gt_right" headers="stub-7 q">0.1739</td>
<td class="gt_row gt_right" headers="stub-7 q_book">0.1739</td>
</tr>
</tbody>
</table>


A fourth unit in the portfolio gives the same premium as the weights:


``` python
loss = sum(p * x for p, x in zip(insco.probs, NEW))
premium = sum(w * x for w, x in zip(qw, NEW))
print(f"new business: loss {loss:.5f} (book 0.02491), premium {premium:.5f} (book 0.02858), "
      f"margin {premium - loss:.5f} (book 0.00367)")

rows4 = [[*k, x] for k, x in zip(zip(*(insco.kappa(u) for u in UNITS)), NEW)]
with_new = Portfolio(UNITS + ["new"], rows4, insco.probs)
print(f"as a fourth unit: premium {with_new.price(wang).allocated[3].premium:.5f}")
```


    new business: loss 0.02491 (book 0.02491), premium 0.02858 (book 0.02858), margin 0.00367 (book 0.00367)
    as a fourth unit: premium 0.02858


The two agree because the account does not reorder the totals. Its premium is its reservation price: the lowest premium that keeps the portfolio on target.


# 5. Mergers and acquisitions

An acquisition is too large to price with the current weights. Section 5.4 scales the new account up about 2,000 times, to a mean of 48.35. At each portfolio total, two points with half the probability each represent the acquired loss: the conditional mean plus and minus one conditional standard deviation. The merged portfolio has fourteen scenarios (Table 5.4). The Wang distortion prices it, with assets equal to its worst total:


``` python
MERGER = [  # (probability, InsCo total, acquired loss), Table 5.4
    (0.05, 22, 29.37), (0.05, 28, 25.47), (0.05, 36, 21.55), (0.2, 40, 22.74),
    (0.05, 22, 49.35), (0.05, 28, 50.79), (0.05, 55, 30.83), (0.05, 36, 50.22),
    (0.2, 40, 49.27), (0.05, 65, 29.89), (0.05, 55, 62.38), (0.05, 100, 47.73),
    (0.05, 65, 83.06), (0.05, 100, 198.30),
]
merged = Portfolio(["InsCo", "acquired"], [[x, y] for _, x, y in MERGER], [p for p, _, _ in MERGER])
m = merged.price(wang)
(old, new), tot = m.allocated, m.total
parts = pd.DataFrame([
    ("expected loss", old.loss, new.loss, tot.loss),
    ("expected loss, book", 46.60, 48.35, 94.95),
    ("Wang premium", old.premium, new.premium, tot.premium),
    ("Wang premium, book", 52.74, 59.09, 111.83),
], columns=["item", "InsCo", "acquired", "merged"])
(pair_table(parts, {"InsCo": 2, "acquired": 2, "merged": 2})
 .tab_header("Table 5.4: the merged portfolio under Wang", "Currency units"))
```


<style>
#ckxphxtocl 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;
        }

#ckxphxtocl thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#ckxphxtocl p { margin: 0; padding: 0; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #ckxphxtocl .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; }
 #ckxphxtocl .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; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ckxphxtocl .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; }
 #ckxphxtocl .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; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_column_spanner_outer:first-child { padding-left: 0; }
 #ckxphxtocl .gt_column_spanner_outer:last-child { padding-right: 0; }
 #ckxphxtocl .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%; }
 #ckxphxtocl .gt_spanner_row { border-bottom-style: hidden; }
 #ckxphxtocl .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; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_from_md> :first-child { margin-top: 0; }
 #ckxphxtocl .gt_from_md> :last-child { margin-bottom: 0; }
 #ckxphxtocl .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; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_indent_1 { text-indent: 5px; }
 #ckxphxtocl .gt_indent_2 { text-indent: calc(5px * 2); }
 #ckxphxtocl .gt_indent_3 { text-indent: calc(5px * 3); }
 #ckxphxtocl .gt_indent_4 { text-indent: calc(5px * 4); }
 #ckxphxtocl .gt_indent_5 { text-indent: calc(5px * 5); }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_row_group_first td { border-top-width: 2px; }
 #ckxphxtocl .gt_row_group_first th { border-top-width: 2px; }
 #ckxphxtocl .gt_striped { color: #333333; background-color: #F4F4F4; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ckxphxtocl .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #ckxphxtocl .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ckxphxtocl .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ckxphxtocl .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #ckxphxtocl .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ckxphxtocl .gt_left { text-align: left; }
 #ckxphxtocl .gt_center { text-align: center; }
 #ckxphxtocl .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #ckxphxtocl .gt_font_normal { font-weight: normal; }
 #ckxphxtocl .gt_font_bold { font-weight: bold; }
 #ckxphxtocl .gt_font_italic { font-style: italic; }
 #ckxphxtocl .gt_super { font-size: 65%; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #ckxphxtocl .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; }
 #ckxphxtocl .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ckxphxtocl .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #ckxphxtocl .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">Table 5.4: the merged portfolio under Wang</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Currency units</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="InsCo" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">InsCo</th>
<th id="acquired" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">acquired</th>
<th id="merged" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">merged</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">expected loss</th>
<td class="gt_row gt_right" headers="stub-1 InsCo">46.60</td>
<td class="gt_row gt_right" headers="stub-1 acquired">48.35</td>
<td class="gt_row gt_right" headers="stub-1 merged">94.95</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">expected loss, book</th>
<td class="gt_row gt_right" headers="stub-2 InsCo">46.6</td>
<td class="gt_row gt_right" headers="stub-2 acquired">48.35</td>
<td class="gt_row gt_right" headers="stub-2 merged">94.95</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">Wang premium</th>
<td class="gt_row gt_right" headers="stub-3 InsCo">52.74</td>
<td class="gt_row gt_right" headers="stub-3 acquired">59.09</td>
<td class="gt_row gt_right" headers="stub-3 merged">111.83</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">Wang premium, book</th>
<td class="gt_row gt_right" headers="stub-4 InsCo">52.74</td>
<td class="gt_row gt_right" headers="stub-4 acquired">59.09</td>
<td class="gt_row gt_right" headers="stub-4 merged">111.83</td>
</tr>
</tbody>
</table>


``` python
extra_premium = tot.premium - required.total.premium
extra_capital = tot.capital - required.total.capital
extra_margin = tot.margin - required.total.margin
effects = pd.DataFrame([
    ("acquisition", extra_premium, tot.assets, tot.capital, tot.return_on_capital,
     extra_capital, extra_margin, extra_margin / extra_capital),
    ("acquisition, book", 58.26, 298.30, 186.46, 0.0906, 140.03, 9.92, 0.0708),
], columns=["item", "premium", "assets", "capital", "ret", "add_cap", "add_margin", "add_ret"])
(pair_table(effects, {"premium": 3, "assets": 2, "capital": 3, "ret": 2, "add_cap": 2,
                      "add_margin": 2, "add_ret": 2}, percent=("ret", "add_ret"))
 .tab_header("The merged portfolio's premium, capital and return", "Currency units")
 .cols_label(premium="premium needed", ret="return", add_cap="added capital",
             add_margin="added margin", add_ret="return on added"))
```


<style>
#hgeqematdk 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;
        }

#hgeqematdk thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#hgeqematdk p { margin: 0; padding: 0; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #hgeqematdk .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; }
 #hgeqematdk .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; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #hgeqematdk .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; }
 #hgeqematdk .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; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_column_spanner_outer:first-child { padding-left: 0; }
 #hgeqematdk .gt_column_spanner_outer:last-child { padding-right: 0; }
 #hgeqematdk .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%; }
 #hgeqematdk .gt_spanner_row { border-bottom-style: hidden; }
 #hgeqematdk .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; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_from_md> :first-child { margin-top: 0; }
 #hgeqematdk .gt_from_md> :last-child { margin-bottom: 0; }
 #hgeqematdk .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; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_indent_1 { text-indent: 5px; }
 #hgeqematdk .gt_indent_2 { text-indent: calc(5px * 2); }
 #hgeqematdk .gt_indent_3 { text-indent: calc(5px * 3); }
 #hgeqematdk .gt_indent_4 { text-indent: calc(5px * 4); }
 #hgeqematdk .gt_indent_5 { text-indent: calc(5px * 5); }
 #hgeqematdk .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; }
 #hgeqematdk .gt_row_group_first td { border-top-width: 2px; }
 #hgeqematdk .gt_row_group_first th { border-top-width: 2px; }
 #hgeqematdk .gt_striped { color: #333333; background-color: #F4F4F4; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #hgeqematdk .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #hgeqematdk .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #hgeqematdk .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #hgeqematdk .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #hgeqematdk .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #hgeqematdk .gt_left { text-align: left; }
 #hgeqematdk .gt_center { text-align: center; }
 #hgeqematdk .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #hgeqematdk .gt_font_normal { font-weight: normal; }
 #hgeqematdk .gt_font_bold { font-weight: bold; }
 #hgeqematdk .gt_font_italic { font-style: italic; }
 #hgeqematdk .gt_super { font-size: 65%; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #hgeqematdk .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; }
 #hgeqematdk .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #hgeqematdk .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #hgeqematdk .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="8" id="title" class="gt_heading gt_title gt_font_normal">The merged portfolio's premium, capital and return</th>
</tr>
<tr class="gt_heading">
<th colspan="8" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Currency units</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="premium" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">premium needed</th>
<th id="assets" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">assets</th>
<th id="capital" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">capital</th>
<th id="ret" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">return</th>
<th id="add_cap" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">added capital</th>
<th id="add_margin" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">added margin</th>
<th id="add_ret" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">return on added</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">acquisition</th>
<td class="gt_row gt_right" headers="stub-1 premium">58.269</td>
<td class="gt_row gt_right" headers="stub-1 assets">298.30</td>
<td class="gt_row gt_right" headers="stub-1 capital">186.466</td>
<td class="gt_row gt_right" headers="stub-1 ret">9.06%</td>
<td class="gt_row gt_right" headers="stub-1 add_cap">140.03</td>
<td class="gt_row gt_right" headers="stub-1 add_margin">9.92</td>
<td class="gt_row gt_right" headers="stub-1 add_ret">7.08%</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">acquisition, book</th>
<td class="gt_row gt_right" headers="stub-2 premium">58.26</td>
<td class="gt_row gt_right" headers="stub-2 assets">298.3</td>
<td class="gt_row gt_right" headers="stub-2 capital">186.46</td>
<td class="gt_row gt_right" headers="stub-2 ret">9.06%</td>
<td class="gt_row gt_right" headers="stub-2 add_cap">140.03</td>
<td class="gt_row gt_right" headers="stub-2 add_margin">9.92</td>
<td class="gt_row gt_right" headers="stub-2 add_ret">7.08%</td>
</tr>
</tbody>
</table>


All values agree with the printed solution to two decimals, with two exceptions. The monograph's premium needed (58.26) subtracts the rounded 53.57 from 111.83, and its capital (186.46) truncates the unrounded value.

The split of the merged premium between the parts does not matter, because the acquisition changes the weights for both. The acquired business must supply the increase in portfolio premium. The return falls to about 9%, below the 15% that set the Wang parameter, because the extra assets are far in the tail, where capital is cheap under Wang.


# 6. Portfolio optimization

Section 5.5 asks the reverse question: at the given prices, which mix of business is best? The objective is economic value added (EVA), plan premium less required premium. The parameters are a scale for each unit between -50% and +50%. Plan premium scales with volume, and capital (assets less plan premium) must stay at 47.8. If everything scaled linearly, each unit's allocated quantities would be its marginal ones (Table 5.5):


``` python
eva = [plan - u.premium for plan, u in zip(PLAN, required.allocated)]
assets = [insco.kappa(u)[-1] for u in UNITS]           # coTVaR: the worst year, 16, 20, 64
capital = [a - plan for a, plan in zip(assets, PLAN)]
table_55 = pd.DataFrame({
    "unit": [*UNITS, "total"], "eva": [*eva, sum(eva)], "capital": [*capital, sum(capital)],
    "ratio": [*(e / c for e, c in zip(eva, capital)), NAN],
})
(GT(table_55, rowname_col="unit")
 .tab_header("Table 5.5: EVA and plan capital by unit", "Currency units")
 .cols_label(eva="EVA", capital="plan capital", ratio="EVA per capital")
 .fmt_number(["eva", "capital", "ratio"], decimals=4)
 .sub_missing(missing_text=""))
```


<style>
#oztemoanfe 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;
        }

#oztemoanfe thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#oztemoanfe p { margin: 0; padding: 0; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #oztemoanfe .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; }
 #oztemoanfe .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; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #oztemoanfe .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; }
 #oztemoanfe .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; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_column_spanner_outer:first-child { padding-left: 0; }
 #oztemoanfe .gt_column_spanner_outer:last-child { padding-right: 0; }
 #oztemoanfe .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%; }
 #oztemoanfe .gt_spanner_row { border-bottom-style: hidden; }
 #oztemoanfe .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; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_from_md> :first-child { margin-top: 0; }
 #oztemoanfe .gt_from_md> :last-child { margin-bottom: 0; }
 #oztemoanfe .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; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_indent_1 { text-indent: 5px; }
 #oztemoanfe .gt_indent_2 { text-indent: calc(5px * 2); }
 #oztemoanfe .gt_indent_3 { text-indent: calc(5px * 3); }
 #oztemoanfe .gt_indent_4 { text-indent: calc(5px * 4); }
 #oztemoanfe .gt_indent_5 { text-indent: calc(5px * 5); }
 #oztemoanfe .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; }
 #oztemoanfe .gt_row_group_first td { border-top-width: 2px; }
 #oztemoanfe .gt_row_group_first th { border-top-width: 2px; }
 #oztemoanfe .gt_striped { color: #333333; background-color: #F4F4F4; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #oztemoanfe .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #oztemoanfe .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #oztemoanfe .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #oztemoanfe .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #oztemoanfe .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #oztemoanfe .gt_left { text-align: left; }
 #oztemoanfe .gt_center { text-align: center; }
 #oztemoanfe .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #oztemoanfe .gt_font_normal { font-weight: normal; }
 #oztemoanfe .gt_font_bold { font-weight: bold; }
 #oztemoanfe .gt_font_italic { font-style: italic; }
 #oztemoanfe .gt_super { font-size: 65%; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #oztemoanfe .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; }
 #oztemoanfe .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #oztemoanfe .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #oztemoanfe .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">Table 5.5: EVA and plan capital by unit</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Currency units</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="eva" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">EVA</th>
<th id="capital" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">plan capital</th>
<th id="ratio" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">EVA per capital</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 eva">−0.2092</td>
<td class="gt_row gt_right" headers="stub-1 capital">2.1000</td>
<td class="gt_row gt_right" headers="stub-1 ratio">−0.0996</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 eva">0.0625</td>
<td class="gt_row gt_right" headers="stub-2 capital">1.3000</td>
<td class="gt_row gt_right" headers="stub-2 ratio">0.0481</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 eva">−1.2186</td>
<td class="gt_row gt_right" headers="stub-3 capital">44.4000</td>
<td class="gt_row gt_right" headers="stub-3 ratio">−0.0274</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 eva">−1.3652</td>
<td class="gt_row gt_right" headers="stub-4 capital">47.8000</td>
<td class="gt_row gt_right" headers="stub-4 ratio"></td>
</tr>
</tbody>
</table>


A linear step takes the best ratios to their limits: shrink A by 50%, grow B by 50%, and grow C only enough to use the released capital (0.4 / 44.4 = 0.9%). The predicted EVA is -1.2403 (Table 5.6). The rerun at those scales keeps the Wang distortion without a new calibration, because the distortion describes investors' appetite and the target return is now an output:


``` python
def rescale(scales):
    """InsCo with each unit's losses and plan premium scaled by 1 + s."""
    rows = [[x * (1 + s) for x, s in zip(row, scales)] for row in ROWS]
    book = Portfolio(UNITS, rows).price(wang)
    plan = [p * (1 + s) for p, s in zip(PLAN, scales)]
    return book, plan


def summary(scales):
    book, plan = rescale(scales)
    return (f"EVA {sum(plan) - book.total.premium:.4f}, assets {book.total.assets:.4f}, "
            f"capital {book.total.assets - sum(plan):.4f}")


def scale_table(cases, digits, title):
    """Required premium by unit at each case's scales, the book's row under it."""
    rows = []
    for label, scales, book_values in cases:
        book, _ = rescale(scales)
        rows.append((label, *(u.premium for u in book.allocated), book.total.premium))
        rows.append((label + ", book", *book_values))
    frame = pd.DataFrame(rows, columns=["case", *UNITS, "total"])
    return (pair_table(frame, {c: digits for c in [*UNITS, "total"]})
            .tab_header(title, "Required premium in currency units"))


linear_step = [-0.5, 0.5, 0.4 / 44.4]
print("linear prediction of EVA:", round(sum(eva) + sum(e * s for e, s in zip(eva, linear_step)), 4),
      "(book -1.2403)")
print(summary(linear_step))
```


    linear prediction of EVA: -1.2404 (book -1.2403)
    EVA -1.4660, assets 102.5766, capital 47.8000


The linear prediction is -1.2404 here and -1.2403 in Table 5.6, which adds steps rounded to four decimals (0.1046, 0.0313, -0.0110). The rerun agrees with Table 5.8:


``` python
scale_table([("linear step", linear_step, [6.8115, 28.6040, 20.8271, 56.2426])], 4,
            "Table 5.8: the premium after the linear step")
```


<style>
#dcayjvrgrl 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;
        }

#dcayjvrgrl thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#dcayjvrgrl p { margin: 0; padding: 0; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_column_spanner_outer:first-child { padding-left: 0; }
 #dcayjvrgrl .gt_column_spanner_outer:last-child { padding-right: 0; }
 #dcayjvrgrl .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%; }
 #dcayjvrgrl .gt_spanner_row { border-bottom-style: hidden; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_from_md> :first-child { margin-top: 0; }
 #dcayjvrgrl .gt_from_md> :last-child { margin-bottom: 0; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_indent_1 { text-indent: 5px; }
 #dcayjvrgrl .gt_indent_2 { text-indent: calc(5px * 2); }
 #dcayjvrgrl .gt_indent_3 { text-indent: calc(5px * 3); }
 #dcayjvrgrl .gt_indent_4 { text-indent: calc(5px * 4); }
 #dcayjvrgrl .gt_indent_5 { text-indent: calc(5px * 5); }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_row_group_first td { border-top-width: 2px; }
 #dcayjvrgrl .gt_row_group_first th { border-top-width: 2px; }
 #dcayjvrgrl .gt_striped { color: #333333; background-color: #F4F4F4; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #dcayjvrgrl .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #dcayjvrgrl .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #dcayjvrgrl .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #dcayjvrgrl .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #dcayjvrgrl .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #dcayjvrgrl .gt_left { text-align: left; }
 #dcayjvrgrl .gt_center { text-align: center; }
 #dcayjvrgrl .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #dcayjvrgrl .gt_font_normal { font-weight: normal; }
 #dcayjvrgrl .gt_font_bold { font-weight: bold; }
 #dcayjvrgrl .gt_font_italic { font-style: italic; }
 #dcayjvrgrl .gt_super { font-size: 65%; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #dcayjvrgrl .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; }
 #dcayjvrgrl .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #dcayjvrgrl .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #dcayjvrgrl .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">Table 5.8: the premium after the linear step</th>
</tr>
<tr class="gt_heading">
<th colspan="5" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Required premium in currency units</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>
<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">linear step</th>
<td class="gt_row gt_right" headers="stub-1 A">6.8115</td>
<td class="gt_row gt_right" headers="stub-1 B">28.6040</td>
<td class="gt_row gt_right" headers="stub-1 C">20.8271</td>
<td class="gt_row gt_right" headers="stub-1 total">56.2426</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">linear step, book</th>
<td class="gt_row gt_right" headers="stub-2 A">6.8115</td>
<td class="gt_row gt_right" headers="stub-2 B">28.604</td>
<td class="gt_row gt_right" headers="stub-2 C">20.8271</td>
<td class="gt_row gt_right" headers="stub-2 total">56.2426</td>
</tr>
</tbody>
</table>


The EVA of -1.466 is worse than the start: scaling the units changes the order of the years (Table 5.7), so Wang weights different years than the linear prediction assumed. With A held at -50%, B shows how uneven the surface is (Figure 5.4):


``` python
def eva_at(sa, sb):
    """EVA with unit C scaled to hold capital at 47.8 (the worst year stays the worst)."""
    sc = -(2.1 * sa + 1.3 * sb) / 44.4
    book, plan = rescale([sa, sb, sc])
    return sum(plan) - book.total.premium


SWEEP = [-0.5, -0.3, -0.21, -0.2, -0.1, 0.0, 0.25, 0.5]
sweep = pd.DataFrame({"b": [f"{sb:+.2f}" for sb in SWEEP], "eva": [eva_at(-0.5, sb) for sb in SWEEP]})
(GT(sweep, rowname_col="b")
 .tab_header("Figure 5.4: EVA as the scale of B changes", "A at -50%, C holds capital at 47.8")
 .cols_label(eva="EVA")
 .fmt_number("eva", decimals=4))
```


<style>
#eugambnnux 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;
        }

#eugambnnux thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#eugambnnux p { margin: 0; padding: 0; }
 #eugambnnux .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; }
 #eugambnnux .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #eugambnnux .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; }
 #eugambnnux .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; }
 #eugambnnux .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; }
 #eugambnnux .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #eugambnnux .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; }
 #eugambnnux .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; }
 #eugambnnux .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; }
 #eugambnnux .gt_column_spanner_outer:first-child { padding-left: 0; }
 #eugambnnux .gt_column_spanner_outer:last-child { padding-right: 0; }
 #eugambnnux .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%; }
 #eugambnnux .gt_spanner_row { border-bottom-style: hidden; }
 #eugambnnux .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; }
 #eugambnnux .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; }
 #eugambnnux .gt_from_md> :first-child { margin-top: 0; }
 #eugambnnux .gt_from_md> :last-child { margin-bottom: 0; }
 #eugambnnux .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; }
 #eugambnnux .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; }
 #eugambnnux .gt_indent_1 { text-indent: 5px; }
 #eugambnnux .gt_indent_2 { text-indent: calc(5px * 2); }
 #eugambnnux .gt_indent_3 { text-indent: calc(5px * 3); }
 #eugambnnux .gt_indent_4 { text-indent: calc(5px * 4); }
 #eugambnnux .gt_indent_5 { text-indent: calc(5px * 5); }
 #eugambnnux .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; }
 #eugambnnux .gt_row_group_first td { border-top-width: 2px; }
 #eugambnnux .gt_row_group_first th { border-top-width: 2px; }
 #eugambnnux .gt_striped { color: #333333; background-color: #F4F4F4; }
 #eugambnnux .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; }
 #eugambnnux .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #eugambnnux .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #eugambnnux .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #eugambnnux .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #eugambnnux .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #eugambnnux .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #eugambnnux .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; }
 #eugambnnux .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #eugambnnux .gt_left { text-align: left; }
 #eugambnnux .gt_center { text-align: center; }
 #eugambnnux .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #eugambnnux .gt_font_normal { font-weight: normal; }
 #eugambnnux .gt_font_bold { font-weight: bold; }
 #eugambnnux .gt_font_italic { font-style: italic; }
 #eugambnnux .gt_super { font-size: 65%; }
 #eugambnnux .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; }
 #eugambnnux .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #eugambnnux .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; }
 #eugambnnux .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #eugambnnux .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #eugambnnux .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="2" id="title" class="gt_heading gt_title gt_font_normal">Figure 5.4: EVA as the scale of B changes</th>
</tr>
<tr class="gt_heading">
<th colspan="2" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">A at -50%, C holds capital at 47.8</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="eva" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">EVA</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<th id="stub-1" class="gt_row gt_left gt_stub" scope="row">-0.50</th>
<td class="gt_row gt_right" headers="stub-1 eva">−1.4321</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">-0.30</th>
<td class="gt_row gt_right" headers="stub-2 eva">−1.3694</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">-0.21</th>
<td class="gt_row gt_right" headers="stub-3 eva">−1.3477</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">-0.20</th>
<td class="gt_row gt_right" headers="stub-4 eva">−1.3484</td>
</tr>
<tr>
<th id="stub-5" class="gt_row gt_left gt_stub" scope="row">-0.10</th>
<td class="gt_row gt_right" headers="stub-5 eva">−1.3604</td>
</tr>
<tr>
<th id="stub-6" class="gt_row gt_left gt_stub" scope="row">+0.00</th>
<td class="gt_row gt_right" headers="stub-6 eva">−1.3724</td>
</tr>
<tr>
<th id="stub-7" class="gt_row gt_left gt_stub" scope="row">+0.25</th>
<td class="gt_row gt_right" headers="stub-7 eva">−1.4058</td>
</tr>
<tr>
<th id="stub-8" class="gt_row gt_left gt_stub" scope="row">+0.50</th>
<td class="gt_row gt_right" headers="stub-8 eva">−1.4660</td>
</tr>
</tbody>
</table>


The monograph's Nelder-Mead search ends at A -0.478165 and B -0.209790. On this kinked surface its end point depends on the start and the implementation, so this guide searches a grid instead, in steps of 0.01 and then 0.0005 around the best point, with [price](../reference/pricing.price.md#prospicio.pricing.price) in a loop:


``` python
coarse = max((eva_at(a / 100, b / 100), a / 100, b / 100)
             for a in range(-50, 51) for b in range(-50, 51))
_, a0, b0 = coarse
fine = max((eva_at(a0 + i / 2000, b0 + j / 2000), a0 + i / 2000, b0 + j / 2000)
           for i in range(-20, 21) for j in range(-20, 21))
print(f"grid: A {fine[1]:+.4f}, B {fine[2]:+.4f}, EVA {fine[0]:.6f}")

POINTS = [(-0.209790, [7.269164, 14.816395, 21.453658, 43.539217]),   # Table 5.9
          (-0.209795, [7.334042, 14.607535, 21.597550, 43.539127])]   # Table 5.10


def at_point(sb):
    return [-0.478165, sb, -(2.1 * -0.478165 + 1.3 * sb) / 44.4]


for sb, _ in POINTS:
    print(f"at A -0.478165, B {sb}: EVA {eva_at(-0.478165, sb):.6f} (book -1.345119)")
    print(summary(at_point(sb)))
```


    grid: A -0.4780, B -0.2095, EVA -1.345142
    at A -0.478165, B -0.20979: EVA -1.345139 (book -1.345119)
    EVA -1.3451, assets 89.9941, capital 47.8000
    at A -0.478165, B -0.209795: EVA -1.345139 (book -1.345119)
    EVA -1.3451, assets 89.9940, capital 47.8000


The grid ends next to the monograph's optimum, a small gain on the start of -1.3652. At the monograph's own point the EVA agrees to about 2e-5. Two scales for B only 0.000005 apart give the same portfolio EVA and very different allocations (Tables 5.9 and 5.10):


``` python
scale_table([(f"B {sb}", at_point(sb), book_values) for sb, book_values in POINTS], 6,
            "Tables 5.9 and 5.10: the premium at the monograph's two optima")
```


<style>
#mdkebynvkp 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;
        }

#mdkebynvkp thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#mdkebynvkp p { margin: 0; padding: 0; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #mdkebynvkp .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; }
 #mdkebynvkp .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; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #mdkebynvkp .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; }
 #mdkebynvkp .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; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_column_spanner_outer:first-child { padding-left: 0; }
 #mdkebynvkp .gt_column_spanner_outer:last-child { padding-right: 0; }
 #mdkebynvkp .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%; }
 #mdkebynvkp .gt_spanner_row { border-bottom-style: hidden; }
 #mdkebynvkp .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; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_from_md> :first-child { margin-top: 0; }
 #mdkebynvkp .gt_from_md> :last-child { margin-bottom: 0; }
 #mdkebynvkp .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; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_indent_1 { text-indent: 5px; }
 #mdkebynvkp .gt_indent_2 { text-indent: calc(5px * 2); }
 #mdkebynvkp .gt_indent_3 { text-indent: calc(5px * 3); }
 #mdkebynvkp .gt_indent_4 { text-indent: calc(5px * 4); }
 #mdkebynvkp .gt_indent_5 { text-indent: calc(5px * 5); }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_row_group_first td { border-top-width: 2px; }
 #mdkebynvkp .gt_row_group_first th { border-top-width: 2px; }
 #mdkebynvkp .gt_striped { color: #333333; background-color: #F4F4F4; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #mdkebynvkp .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #mdkebynvkp .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #mdkebynvkp .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #mdkebynvkp .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #mdkebynvkp .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #mdkebynvkp .gt_left { text-align: left; }
 #mdkebynvkp .gt_center { text-align: center; }
 #mdkebynvkp .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #mdkebynvkp .gt_font_normal { font-weight: normal; }
 #mdkebynvkp .gt_font_bold { font-weight: bold; }
 #mdkebynvkp .gt_font_italic { font-style: italic; }
 #mdkebynvkp .gt_super { font-size: 65%; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #mdkebynvkp .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; }
 #mdkebynvkp .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #mdkebynvkp .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #mdkebynvkp .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">Tables 5.9 and 5.10: the premium at the monograph's two optima</th>
</tr>
<tr class="gt_heading">
<th colspan="5" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Required premium in currency units</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>
<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">B -0.20979</th>
<td class="gt_row gt_right" headers="stub-1 A">7.269165</td>
<td class="gt_row gt_right" headers="stub-1 B">14.816395</td>
<td class="gt_row gt_right" headers="stub-1 C">21.453677</td>
<td class="gt_row gt_right" headers="stub-1 total">43.539237</td>
</tr>
<tr>
<th id="stub-2" class="gt_row gt_left gt_stub" scope="row">B -0.20979, book</th>
<td class="gt_row gt_right" headers="stub-2 A">7.269164</td>
<td class="gt_row gt_right" headers="stub-2 B">14.816395</td>
<td class="gt_row gt_right" headers="stub-2 C">21.453658</td>
<td class="gt_row gt_right" headers="stub-2 total">43.539217</td>
</tr>
<tr>
<th id="stub-3" class="gt_row gt_left gt_stub" scope="row">B -0.209795</th>
<td class="gt_row gt_right" headers="stub-3 A">7.334043</td>
<td class="gt_row gt_right" headers="stub-3 B">14.607535</td>
<td class="gt_row gt_right" headers="stub-3 C">21.597569</td>
<td class="gt_row gt_right" headers="stub-3 total">43.539147</td>
</tr>
<tr>
<th id="stub-4" class="gt_row gt_left gt_stub" scope="row">B -0.209795, book</th>
<td class="gt_row gt_right" headers="stub-4 A">7.334042</td>
<td class="gt_row gt_right" headers="stub-4 B">14.607535</td>
<td class="gt_row gt_right" headers="stub-4 C">21.59755</td>
<td class="gt_row gt_right" headers="stub-4 total">43.539127</td>
</tr>
</tbody>
</table>


Two years almost tie for their place in the order, and the year that comes first decides which unit gets the Wang weight. Units A and B agree to the six printed decimals. Unit C is 2e-5 higher here, within the unprinted digits of the scales and of the Wang parameter. The monograph's conclusion holds: the optimum is flat, kinked and sensitive, so read it as a direction, not a target.


# 7. The range of possible prices

Chapter 6 asks which distortion to use. Section 6.1 starts from the extremes, the mean (TVaR at 0) and the maximum (TVaR at 1). The CCoC is the blend that puts weight `d = 0.15 / 1.15` on the maximum and the rest on the mean (Table 6.1):


``` python
ccoc = distortions["ccoc"]
blend = Distortion.bitvar(0.0, 1.0, 0.15 / 1.15)
table_61 = pd.DataFrame({"total": states, "ccoc": wang_q(ccoc, insco.probs),
                         "blend": wang_q(blend, insco.probs)})
(GT(table_61, rowname_col="total")
 .tab_header("Table 6.1: the CCoC weights and the blend of mean and maximum",
             "Rows are the seven portfolio totals")
 .cols_label(ccoc="q, CCoC", blend="q, blend")
 .fmt_number(["ccoc", "blend"], decimals=3))
```


<style>
#yuaiyoykop 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;
        }

#yuaiyoykop thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#yuaiyoykop p { margin: 0; padding: 0; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #yuaiyoykop .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; }
 #yuaiyoykop .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; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #yuaiyoykop .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; }
 #yuaiyoykop .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; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_column_spanner_outer:first-child { padding-left: 0; }
 #yuaiyoykop .gt_column_spanner_outer:last-child { padding-right: 0; }
 #yuaiyoykop .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%; }
 #yuaiyoykop .gt_spanner_row { border-bottom-style: hidden; }
 #yuaiyoykop .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; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_from_md> :first-child { margin-top: 0; }
 #yuaiyoykop .gt_from_md> :last-child { margin-bottom: 0; }
 #yuaiyoykop .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; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_indent_1 { text-indent: 5px; }
 #yuaiyoykop .gt_indent_2 { text-indent: calc(5px * 2); }
 #yuaiyoykop .gt_indent_3 { text-indent: calc(5px * 3); }
 #yuaiyoykop .gt_indent_4 { text-indent: calc(5px * 4); }
 #yuaiyoykop .gt_indent_5 { text-indent: calc(5px * 5); }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_row_group_first td { border-top-width: 2px; }
 #yuaiyoykop .gt_row_group_first th { border-top-width: 2px; }
 #yuaiyoykop .gt_striped { color: #333333; background-color: #F4F4F4; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #yuaiyoykop .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #yuaiyoykop .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #yuaiyoykop .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #yuaiyoykop .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #yuaiyoykop .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #yuaiyoykop .gt_left { text-align: left; }
 #yuaiyoykop .gt_center { text-align: center; }
 #yuaiyoykop .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #yuaiyoykop .gt_font_normal { font-weight: normal; }
 #yuaiyoykop .gt_font_bold { font-weight: bold; }
 #yuaiyoykop .gt_font_italic { font-style: italic; }
 #yuaiyoykop .gt_super { font-size: 65%; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #yuaiyoykop .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; }
 #yuaiyoykop .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #yuaiyoykop .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #yuaiyoykop .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">Table 6.1: the CCoC weights and the blend of mean and maximum</th>
</tr>
<tr class="gt_heading">
<th colspan="3" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Rows are the seven portfolio totals</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="ccoc" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">q, CCoC</th>
<th id="blend" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">q, blend</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 ccoc">0.087</td>
<td class="gt_row gt_right" headers="stub-1 blend">0.087</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 ccoc">0.087</td>
<td class="gt_row gt_right" headers="stub-2 blend">0.087</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 ccoc">0.087</td>
<td class="gt_row gt_right" headers="stub-3 blend">0.087</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 ccoc">0.348</td>
<td class="gt_row gt_right" headers="stub-4 blend">0.348</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 ccoc">0.087</td>
<td class="gt_row gt_right" headers="stub-5 blend">0.087</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 ccoc">0.087</td>
<td class="gt_row gt_right" headers="stub-6 blend">0.087</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 ccoc">0.217</td>
<td class="gt_row gt_right" headers="stub-7 blend">0.217</td>
</tr>
</tbody>
</table>


Infinitely many distortions price the portfolio at 53.565, and they disagree about the units. The monograph spans them with five representatives. [Portfolio.premium_bounds](../reference/pricing.Portfolio.md#prospicio.pricing.Portfolio.premium_bounds) finds the true extremes for each unit, always bi-TVaRs (Section 11.2 of *Pricing Insurance Risk*):


``` python
target = required.total.premium
by_family = {f: [u.premium for u in insco.price(g, assets=100).allocated]
             for f, g in distortions.items()}
ranges = pd.DataFrame([
    (b["unit"], b["lower"], min(by_family[f][i] for f in FAMILIES),
     max(by_family[f][i] for f in FAMILIES), b["upper"])
    for i, b in enumerate(insco.premium_bounds(target, assets=100))
], columns=["unit", "lowest", "five_low", "five_high", "highest"])
(GT(ranges, rowname_col="unit")
 .tab_header("Premium of each unit: all distortions against the five", "Currency units")
 .cols_label(lowest="lowest", five_low="five, low", five_high="five, high", highest="highest")
 .fmt_number(["lowest", "five_low", "five_high", "highest"], decimals=3))
```


<style>
#ytsfmhqgcj 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;
        }

#ytsfmhqgcj thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#ytsfmhqgcj p { margin: 0; padding: 0; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_column_spanner_outer:first-child { padding-left: 0; }
 #ytsfmhqgcj .gt_column_spanner_outer:last-child { padding-right: 0; }
 #ytsfmhqgcj .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%; }
 #ytsfmhqgcj .gt_spanner_row { border-bottom-style: hidden; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_from_md> :first-child { margin-top: 0; }
 #ytsfmhqgcj .gt_from_md> :last-child { margin-bottom: 0; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_indent_1 { text-indent: 5px; }
 #ytsfmhqgcj .gt_indent_2 { text-indent: calc(5px * 2); }
 #ytsfmhqgcj .gt_indent_3 { text-indent: calc(5px * 3); }
 #ytsfmhqgcj .gt_indent_4 { text-indent: calc(5px * 4); }
 #ytsfmhqgcj .gt_indent_5 { text-indent: calc(5px * 5); }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_row_group_first td { border-top-width: 2px; }
 #ytsfmhqgcj .gt_row_group_first th { border-top-width: 2px; }
 #ytsfmhqgcj .gt_striped { color: #333333; background-color: #F4F4F4; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ytsfmhqgcj .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #ytsfmhqgcj .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #ytsfmhqgcj .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #ytsfmhqgcj .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #ytsfmhqgcj .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ytsfmhqgcj .gt_left { text-align: left; }
 #ytsfmhqgcj .gt_center { text-align: center; }
 #ytsfmhqgcj .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #ytsfmhqgcj .gt_font_normal { font-weight: normal; }
 #ytsfmhqgcj .gt_font_bold { font-weight: bold; }
 #ytsfmhqgcj .gt_font_italic { font-style: italic; }
 #ytsfmhqgcj .gt_super { font-size: 65%; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #ytsfmhqgcj .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; }
 #ytsfmhqgcj .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #ytsfmhqgcj .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #ytsfmhqgcj .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">Premium of each unit: all distortions against the five</th>
</tr>
<tr class="gt_heading">
<th colspan="5" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Currency units</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="lowest" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">lowest</th>
<th id="five_low" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">five, low</th>
<th id="five_high" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">five, high</th>
<th id="highest" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">highest</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 lowest">13.098</td>
<td class="gt_row gt_right" headers="stub-1 five_low">13.739</td>
<td class="gt_row gt_right" headers="stub-1 five_high">14.127</td>
<td class="gt_row gt_right" headers="stub-1 highest">15.033</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 lowest">17.466</td>
<td class="gt_row gt_right" headers="stub-2 five_low">18.349</td>
<td class="gt_row gt_right" headers="stub-2 five_high">20.412</td>
<td class="gt_row gt_right" headers="stub-2 highest">20.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 lowest">19.255</td>
<td class="gt_row gt_right" headers="stub-3 five_low">19.371</td>
<td class="gt_row gt_right" headers="stub-3 five_high">21.304</td>
<td class="gt_row gt_right" headers="stub-3 highest">22.098</td>
</tr>
</tbody>
</table>


Grey: all distortions. Coloured: the five. Dot: the plan.


``` python
import matplotlib.pyplot as plt

bounds = insco.premium_bounds(target, assets=100)
fig, ax = plt.subplots()
for y, b in enumerate(bounds):
    five = [by_family[f][y] for f in FAMILIES]
    ax.plot([b["lower"], b["upper"]], [y, y], color="0.75", linewidth=10, solid_capstyle="butt",
            label="all distortions" if y == 0 else None)
    ax.plot([min(five), max(five)], [y, y], color="C0", linewidth=4, solid_capstyle="butt",
            label="the five" if y == 0 else None)
    ax.plot(PLAN[y], y, "o", color="C1", label="plan" if y == 0 else None)
ax.set_yticks(range(len(UNITS)), [f"unit {u}" for u in UNITS])
ax.set_xlabel("premium (currency units)")
ax.set_title(f"Range of the premium of each unit at a total premium of {target:.3f}")
ax.legend()
```


<figure class="p-figure figure">
<img src="data:image/svg+xml;base64,PHN2ZyB4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjQ0NC40ODc4MTJwdCIgaGVpZ2h0PSIyNjIuMTAyOTg0cHQiIHZpZXdib3g9IjAgMCA0NDQuNDg3ODEyIDI2Mi4xMDI5ODQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIj4KIDxtZXRhZGF0YT4KICA8cmRmIHhtb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fMTIiPgogICAgIDx0ZXh0IHN0eWxlPSJmb250LXNpemU6IDExcHg7IGZvbnQtZmFtaWx5OiB2YXIoLS1wLWZvbnQpOyB0ZXh0LWFuY2hvcjogc3RhcnQ7IGZpbGw6IHZhcigtLXAtaW5rKSIgeD0iODcuMzg3ODEyIiB5PSI1Ny4wNzcyNjYiIHRyYW5zZm9ybT0icm90YXRlKC0wIDg3LjM4NzgxMiA1Ny4wNzcyNjYpIj50aGUgZml2ZTwvdGV4dD4KICAgIDwvZz4KICAgIDxnIGlkPSJsaW5lMmRfMjgiPgogICAgIDxnPgogICAgICA8dXNlIGhyZWY9IiNtYzQ5MDY5ZTdhOSIgeD0iNjcuNTg3ODEyIiB5PSI2OS43MjgxMjUiIHN0eWxlPSJmaWxsOiB2YXIoLS1wLXNlcmllcy0yKTsgc3Ryb2tlOiB2YXIoLS1wLXNlcmllcy0yKSIgLz4KICAgICA8L2c+CiAgICA8L2c+CiAgICA8ZyBpZD0idGV4dF8xMyI+CiAgICAgPHRleHQgc3R5bGU9ImZvbnQtc2l6ZTogMTFweDsgZm9udC1mYW1pbHk6IHZhcigtLXAtZm9udCk7IHRleHQtYW5jaG9yOiBzdGFydDsgZmlsbDogdmFyKC0tcC1pbmspIiB4PSI4Ny4zODc4MTIiIHk9IjczLjU3ODEyNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTAgODcuMzg3ODEyIDczLjU3ODEyNSkiPnBsYW48L3RleHQ+CiAgICA8L2c+CiAgIDwvZz4KICA8L2c+CiA8L2c+CiA8ZGVmcz4KICA8Y2xpcHBhdGggaWQ9InA4NTdhODA5MzgzIj4KICAgPHJlY3QgeD0iNDYuNjg3ODEyIiB5PSIyMi4zMTgxMjUiIHdpZHRoPSIzOTAuNiIgaGVpZ2h0PSIxOTkuNTg0IiAvPgogIDwvY2xpcHBhdGg+CiA8L2RlZnM+Cjwvc3ZnPg==" />
</figure>


The five cover most of each unit's range, not all of it: a distortion outside the five can price unit A as low as 13.098. The monograph warns that unless one distortion lies above another everywhere, the two rank some pair of risks in opposite orders. So distortions have no single order by price.


# 8. Required premium by distortion

Section 6.2 gives the required premium and loss ratio of each unit under each distortion (Table 6.2):


``` python
BOOK_62 = {  # Table 6.2, premium by unit
    "ccoc": (13.739, 18.522, 21.304), "ph": (14.060, 18.349, 21.156),
    "wang": (14.109, 18.637, 20.818), "dual": (14.127, 19.117, 20.321),
    "tvar": (13.783, 20.412, 19.371),
}
loss = insco.expected()
rows = []
for f in FAMILIES:
    rows.append((f, *by_family[f], *(l / p for l, p in zip(loss, by_family[f]))))
    rows.append((f + ", book", *BOOK_62[f], NAN, NAN, NAN))
rows.append(("plan", *PLAN, *(l / p for l, p in zip(loss, PLAN))))
table_62 = pd.DataFrame(rows, columns=["distortion", "a", "b", "c", "a_lr", "b_lr", "c_lr"])
(pair_table(table_62, {"a": 3, "b": 3, "c": 3, "a_lr": 1, "b_lr": 1, "c_lr": 1},
            percent=("a_lr", "b_lr", "c_lr"))
 .tab_header("Table 6.2: required premium and loss ratio by distortion", "Premium in currency units")
 .cols_label(a="A premium", b="B premium", c="C premium", a_lr="A loss ratio",
             b_lr="B loss ratio", c_lr="C loss ratio"))
```


<style>
#qtdufapzxh 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;
        }

#qtdufapzxh thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#qtdufapzxh p { margin: 0; padding: 0; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #qtdufapzxh .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; }
 #qtdufapzxh .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; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #qtdufapzxh .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; }
 #qtdufapzxh .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; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_column_spanner_outer:first-child { padding-left: 0; }
 #qtdufapzxh .gt_column_spanner_outer:last-child { padding-right: 0; }
 #qtdufapzxh .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%; }
 #qtdufapzxh .gt_spanner_row { border-bottom-style: hidden; }
 #qtdufapzxh .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; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_from_md> :first-child { margin-top: 0; }
 #qtdufapzxh .gt_from_md> :last-child { margin-bottom: 0; }
 #qtdufapzxh .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; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_indent_1 { text-indent: 5px; }
 #qtdufapzxh .gt_indent_2 { text-indent: calc(5px * 2); }
 #qtdufapzxh .gt_indent_3 { text-indent: calc(5px * 3); }
 #qtdufapzxh .gt_indent_4 { text-indent: calc(5px * 4); }
 #qtdufapzxh .gt_indent_5 { text-indent: calc(5px * 5); }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_row_group_first td { border-top-width: 2px; }
 #qtdufapzxh .gt_row_group_first th { border-top-width: 2px; }
 #qtdufapzxh .gt_striped { color: #333333; background-color: #F4F4F4; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #qtdufapzxh .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #qtdufapzxh .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #qtdufapzxh .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #qtdufapzxh .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #qtdufapzxh .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #qtdufapzxh .gt_left { text-align: left; }
 #qtdufapzxh .gt_center { text-align: center; }
 #qtdufapzxh .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #qtdufapzxh .gt_font_normal { font-weight: normal; }
 #qtdufapzxh .gt_font_bold { font-weight: bold; }
 #qtdufapzxh .gt_font_italic { font-style: italic; }
 #qtdufapzxh .gt_super { font-size: 65%; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #qtdufapzxh .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; }
 #qtdufapzxh .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #qtdufapzxh .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #qtdufapzxh .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">Table 6.2: required premium and loss ratio by distortion</th>
</tr>
<tr class="gt_heading">
<th colspan="7" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Premium in currency units</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 premium</th>
<th id="b" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">B premium</th>
<th id="c" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">C premium</th>
<th id="a_lr" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">A loss ratio</th>
<th id="b_lr" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">B loss ratio</th>
<th id="c_lr" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">C loss ratio</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>
<td class="gt_row gt_right" headers="stub-1 a_lr">97.5%</td>
<td class="gt_row gt_right" headers="stub-1 b_lr">98.8%</td>
<td class="gt_row gt_right" headers="stub-1 c_lr">69.9%</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>
<td class="gt_row gt_right" headers="stub-2 a_lr"></td>
<td class="gt_row gt_right" headers="stub-2 b_lr"></td>
<td class="gt_row gt_right" headers="stub-2 c_lr"></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>
<td class="gt_row gt_right" headers="stub-3 a_lr">95.3%</td>
<td class="gt_row gt_right" headers="stub-3 b_lr">99.7%</td>
<td class="gt_row gt_right" headers="stub-3 c_lr">70.4%</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.06</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>
<td class="gt_row gt_right" headers="stub-4 a_lr"></td>
<td class="gt_row gt_right" headers="stub-4 b_lr"></td>
<td class="gt_row gt_right" headers="stub-4 c_lr"></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>
<td class="gt_row gt_right" headers="stub-5 a_lr">95.0%</td>
<td class="gt_row gt_right" headers="stub-5 b_lr">98.2%</td>
<td class="gt_row gt_right" headers="stub-5 c_lr">71.6%</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.818</td>
<td class="gt_row gt_right" headers="stub-6 a_lr"></td>
<td class="gt_row gt_right" headers="stub-6 b_lr"></td>
<td class="gt_row gt_right" headers="stub-6 c_lr"></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>
<td class="gt_row gt_right" headers="stub-7 a_lr">94.9%</td>
<td class="gt_row gt_right" headers="stub-7 b_lr">95.7%</td>
<td class="gt_row gt_right" headers="stub-7 c_lr">73.3%</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.321</td>
<td class="gt_row gt_right" headers="stub-8 a_lr"></td>
<td class="gt_row gt_right" headers="stub-8 b_lr"></td>
<td class="gt_row gt_right" headers="stub-8 c_lr"></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>
<td class="gt_row gt_right" headers="stub-9 a_lr">97.2%</td>
<td class="gt_row gt_right" headers="stub-9 b_lr">89.7%</td>
<td class="gt_row gt_right" headers="stub-9 c_lr">76.9%</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>
<td class="gt_row gt_right" headers="stub-10 a_lr"></td>
<td class="gt_row gt_right" headers="stub-10 b_lr"></td>
<td class="gt_row gt_right" headers="stub-10 c_lr"></td>
</tr>
<tr>
<th id="stub-11" class="gt_row gt_left gt_stub" scope="row">plan</th>
<td class="gt_row gt_right" headers="stub-11 a">13.900</td>
<td class="gt_row gt_right" headers="stub-11 b">18.700</td>
<td class="gt_row gt_right" headers="stub-11 c">19.600</td>
<td class="gt_row gt_right" headers="stub-11 a_lr">96.4%</td>
<td class="gt_row gt_right" headers="stub-11 b_lr">97.9%</td>
<td class="gt_row gt_right" headers="stub-11 c_lr">76.0%</td>
</tr>
</tbody>
</table>


Section 6.3 shows which distortion is cheapest for each unit (Table 6.3):


``` python
for i, u in enumerate(UNITS):
    cheapest = min(FAMILIES, key=lambda f: by_family[f][i])
    within = min(by_family[f][i] for f in FAMILIES) <= PLAN[i]
    print(f"{u}: cheapest {cheapest}, plan meets at least one distortion: {within}")
```


    A: cheapest ccoc, plan meets at least one distortion: True
    B: cheapest ph, plan meets at least one distortion: True
    C: cheapest tvar, plan meets at least one distortion: True


``` python
fig, axes = plt.subplots(1, 3, figsize=(7.0, 3.4))
for i, ax in enumerate(axes):
    ax.plot(FAMILIES, [by_family[f][i] for f in FAMILIES], "o", color="C0", label="required")
    ax.axhline(PLAN[i], color="C1", label="plan")
    ax.set_title(f"Unit {UNITS[i]}")
    ax.tick_params(axis="x", labelrotation=45)
axes[0].set_ylabel("premium (currency units)")
axes[1].legend(loc="upper left")
fig.suptitle("Required premium by distortion, against the plan")
fig.tight_layout()
```


<figure class="p-figure figure">
yI+CiAgICAgPGcgaWQ9ImxpbmUyZF80OSI+CiAgICAgIDxwYXRoIGQ9Ik0gNDI1LjQxNjk5IDE5OC43MDIyOTIgCkwgNDI1LjQxNjk5IDU0Ljg1MjI4MSAKIiBjbGlwLXBhdGg9InVybCgjcDhkYzYzNDdjOTgpIiBzdHlsZT0iZmlsbDogbm9uZTsgc3Ryb2tlOiB2YXIoLS1wLXJ1bGUpOyBzdHJva2Utd2lkdGg6IDAuODsgc3Ryb2tlLWxpbmVjYXA6IHNxdWFyZSIgLz4KICAgICA8L2c+CiAgICAgPGcgaWQ9ImxpbmUyZF81MCI+CiAgICAgIDxnPgogICAgICAgPHVzZSBocmVmPSIjbTU2M2ViNDRlNjQiIHg9IjQyNS40MTY5OSIgeT0iMTk4LjcwMjI5MiIgc3R5bGU9ImZpbGw6IHZhcigtLXAtbXV0ZWQpOyBzdHJva2U6IHZhcigtLXAtbXV0ZWQpOyBzdHJva2Utd2lkdGg6IDAuOCIgLz4KICAgICAgPC9nPgogICAgIDwvZz4KICAgICA8ZyBpZD0idGV4dF8yNyI+CiAgICAgIDx0ZXh0IHN0eWxlPSJmb250LXNpemU6IDExcHg7IGZvbnQtZmFtaWx5OiB2YXIoLS1wLWZvbnQpOyBmaWxsOiB2YXIoLS1wLW11dGVkKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDE2LjkzOTk5NSAyMzIuNjA2ODc2KSByb3RhdGUoLTQ1KSI+d2FuZzwvdGV4dD4KICAgICA8L2c+CiAgICA8L2c+CiAgICA8ZyBpZD0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jU2MzA0NyIgeT0iMTcuMjI5OTM4IiB0cmFuc2Zvcm09InJvdGF0ZSgtMCAyNDUuNTYzMDQ3IDE3LjIyOTkzOCkiPlJlcXVpcmVkIHByZW1pdW0gYnkgZGlzdG9ydGlvbiwgYWdhaW5zdCB0aGUgcGxhbjwvdGV4dD4KICA8L2c+CiA8L2c+CiA8ZGVmcz4KICA8Y2xpcHBhdGggaWQ9InAyM2E0ZGViNjM1Ij4KICAgPHJlY3QgeD0iNTMuNjkzMDQ3IiB5PSI1NC44NTIyODEiIHdpZHRoPSIxMDcuMjg3ODg3IiBoZWlnaHQ9IjE0My44NTAwMTEiIC8+CiAgPC9jbGlwcGF0aD4KICA8Y2xpcHBhdGggaWQ9InAxODFmMzYzMTAzIj4KICAgPHJlY3QgeD0iMjEyLjczMzA0NyIgeT0iNTQuODUyMjgxIiB3aWR0aD0iMTA3LjI4Nzg4NyIgaGVpZ2h0PSIxNDMuODUwMDExIiAvPgogIDwvY2xpcHBhdGg+CiAgPGNsaXBwYXRoIGlkPSJwOGRjNjM0N2M5OCI+CiAgIDxyZWN0IHg9IjM3MS43NzMwNDciIHk9IjU0Ljg1MjI4MSIgd2lkdGg9IjEwNy4yODc4ODciIGhlaWdodD0iMTQzLjg1MDAxMSIgLz4KICA8L2NsaXBwYXRoPgogPC9kZWZzPgo8L3N2Zz4=" />
</figure>


Unit C's two small differences are rounding. The dual power premium is 20.32158, printed as 20.321 in Table 6.2 and 20.322 in Table 9.8 (the monograph's dual parameter is a few millionths lower, on the rounding point). The Wang premium is 20.81858, printed as 20.818 in Table 6.2 and 20.819 in Table 5.1. Each unit's plan meets at least one distortion, but no single distortion is met by all three plans.


# 9. Zeroing in, or embracing the range

Section 6.3 suggests calibration to the market where possible. Suppose InsCo's Baa bonds have a real default probability of 1.5% to 2%, and the market prices them as if it were 2.5% to 4%. A candidate distortion should map the first range into the second:


``` python
rows = []
for f, g in distortions.items():
    lo, hi = g.g(0.015), g.g(0.02)
    rows.append((f, lo, hi, "yes" if hi >= 0.025 and lo <= 0.04 else "no"))
bonds = pd.DataFrame(rows, columns=["distortion", "lo", "hi", "fits"])
(GT(bonds, rowname_col="distortion")
 .tab_header("Each distortion on the Baa bond's default probability", "g(s) at 1.5% and 2%")
 .cols_label(lo="g(1.5%)", hi="g(2%)", fits="overlaps 2.5% to 4%")
 .fmt_percent(["lo", "hi"], decimals=2))
```


<style>
#loibzphaxb 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;
        }

#loibzphaxb thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#loibzphaxb p { margin: 0; padding: 0; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #loibzphaxb .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; }
 #loibzphaxb .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; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #loibzphaxb .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; }
 #loibzphaxb .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; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_column_spanner_outer:first-child { padding-left: 0; }
 #loibzphaxb .gt_column_spanner_outer:last-child { padding-right: 0; }
 #loibzphaxb .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%; }
 #loibzphaxb .gt_spanner_row { border-bottom-style: hidden; }
 #loibzphaxb .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; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_from_md> :first-child { margin-top: 0; }
 #loibzphaxb .gt_from_md> :last-child { margin-bottom: 0; }
 #loibzphaxb .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; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_indent_1 { text-indent: 5px; }
 #loibzphaxb .gt_indent_2 { text-indent: calc(5px * 2); }
 #loibzphaxb .gt_indent_3 { text-indent: calc(5px * 3); }
 #loibzphaxb .gt_indent_4 { text-indent: calc(5px * 4); }
 #loibzphaxb .gt_indent_5 { text-indent: calc(5px * 5); }
 #loibzphaxb .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; }
 #loibzphaxb .gt_row_group_first td { border-top-width: 2px; }
 #loibzphaxb .gt_row_group_first th { border-top-width: 2px; }
 #loibzphaxb .gt_striped { color: #333333; background-color: #F4F4F4; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #loibzphaxb .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #loibzphaxb .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #loibzphaxb .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #loibzphaxb .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #loibzphaxb .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #loibzphaxb .gt_left { text-align: left; }
 #loibzphaxb .gt_center { text-align: center; }
 #loibzphaxb .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #loibzphaxb .gt_font_normal { font-weight: normal; }
 #loibzphaxb .gt_font_bold { font-weight: bold; }
 #loibzphaxb .gt_font_italic { font-style: italic; }
 #loibzphaxb .gt_super { font-size: 65%; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #loibzphaxb .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; }
 #loibzphaxb .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #loibzphaxb .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #loibzphaxb .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">Each distortion on the Baa bond's default probability</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">g(s) at 1.5% and 2%</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="lo" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">g(1.5%)</th>
<th id="hi" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">g(2%)</th>
<th id="fits" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col">overlaps 2.5% to 4%</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 lo">14.35%</td>
<td class="gt_row gt_right" headers="stub-1 hi">14.78%</td>
<td class="gt_row gt_left" headers="stub-1 fits">no</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 lo">4.85%</td>
<td class="gt_row gt_right" headers="stub-2 hi">5.97%</td>
<td class="gt_row gt_left" headers="stub-2 fits">no</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 lo">3.38%</td>
<td class="gt_row gt_right" headers="stub-3 hi">4.35%</td>
<td class="gt_row gt_left" headers="stub-3 fits">yes</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 lo">2.38%</td>
<td class="gt_row gt_right" headers="stub-4 hi">3.17%</td>
<td class="gt_row gt_left" headers="stub-4 fits">yes</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 lo">2.06%</td>
<td class="gt_row gt_right" headers="stub-5 hi">2.74%</td>
<td class="gt_row gt_left" headers="stub-5 fits">yes</td>
</tr>
</tbody>
</table>


Wang and the dual power fit the bond, as the monograph's "Dual and Wang, with TVaR a distant third" says. TVaR touches the window only at its top. PH and the CCoC overprice the bond's risk.

Section 6.4 takes the other path: no distortion is right, but the range gives information. The stop loss of section 3 is worth 7.6 under the CCoC and 4.8 under TVaR, as wide as the reinsurance cycle:


``` python
rows = []
for f, g in distortions.items():
    _, ceded = split.price(g, assets=100).allocated
    rows.append((f, ceded.premium, ceded.loss / ceded.premium, "yes" if ceded.premium > 6.5 else "no"))
cover = pd.DataFrame(rows, columns=["distortion", "worth", "lr", "buy"])
(GT(cover, rowname_col="distortion")
 .tab_header("The stop loss to InsCo by distortion", "Value in currency units; quoted premium 6.5")
 .cols_label(worth="cover worth", lr="loss ratio", buy="buy at 6.5")
 .fmt_number("worth", decimals=3)
 .fmt_percent("lr", decimals=0))
```


<style>
#mpiuhrzpbv 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;
        }

#mpiuhrzpbv thead, tbody, tfoot, tr, td, th { border-style: none; }
 tr { background-color: transparent; }
#mpiuhrzpbv p { margin: 0; padding: 0; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_caption { padding-top: 4px; padding-bottom: 4px; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_bottom_border { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_column_spanner_outer:first-child { padding-left: 0; }
 #mpiuhrzpbv .gt_column_spanner_outer:last-child { padding-right: 0; }
 #mpiuhrzpbv .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%; }
 #mpiuhrzpbv .gt_spanner_row { border-bottom-style: hidden; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_from_md> :first-child { margin-top: 0; }
 #mpiuhrzpbv .gt_from_md> :last-child { margin-bottom: 0; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_indent_1 { text-indent: 5px; }
 #mpiuhrzpbv .gt_indent_2 { text-indent: calc(5px * 2); }
 #mpiuhrzpbv .gt_indent_3 { text-indent: calc(5px * 3); }
 #mpiuhrzpbv .gt_indent_4 { text-indent: calc(5px * 4); }
 #mpiuhrzpbv .gt_indent_5 { text-indent: calc(5px * 5); }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_row_group_first td { border-top-width: 2px; }
 #mpiuhrzpbv .gt_row_group_first th { border-top-width: 2px; }
 #mpiuhrzpbv .gt_striped { color: #333333; background-color: #F4F4F4; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #mpiuhrzpbv .gt_first_summary_row { border-top-style: solid; border-top-width: 2px; border-top-color: #D3D3D3; }
 #mpiuhrzpbv .gt_last_summary_row_top { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #D3D3D3; }
 #mpiuhrzpbv .gt_grand_summary_row { color: #333333; background-color: #FFFFFF; text-transform: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 5px; padding-right: 5px; }
 #mpiuhrzpbv .gt_first_grand_summary_row_bottom { border-top-style: double; border-top-width: 6px; border-top-color: #D3D3D3; }
 #mpiuhrzpbv .gt_last_grand_summary_row_top { border-bottom-style: double; border-bottom-width: 6px; border-bottom-color: #D3D3D3; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #mpiuhrzpbv .gt_left { text-align: left; }
 #mpiuhrzpbv .gt_center { text-align: center; }
 #mpiuhrzpbv .gt_right { text-align: right; font-variant-numeric: tabular-nums; }
 #mpiuhrzpbv .gt_font_normal { font-weight: normal; }
 #mpiuhrzpbv .gt_font_bold { font-weight: bold; }
 #mpiuhrzpbv .gt_font_italic { font-style: italic; }
 #mpiuhrzpbv .gt_super { font-size: 65%; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_footnote { margin: 0px; font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; }
 #mpiuhrzpbv .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; }
 #mpiuhrzpbv .gt_sourcenote { font-size: 90%; padding-top: 4px; padding-bottom: 4px; padding-left: 5px; padding-right: 5px; text-align: left; }
 #mpiuhrzpbv .gt_footnote_marks { font-size: 75%; vertical-align: 0.4em; position: initial; }
 #mpiuhrzpbv .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">The stop loss to InsCo by distortion</th>
</tr>
<tr class="gt_heading">
<th colspan="4" id="subtitle" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border">Value in currency units; quoted premium 6.5</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"></th>
<th id="worth" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">cover worth</th>
<th id="lr" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col">loss ratio</th>
<th id="buy" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col">buy at 6.5</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 worth">7.609</td>
<td class="gt_row gt_right" headers="stub-1 lr">46%</td>
<td class="gt_row gt_left" headers="stub-1 buy">yes</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 worth">6.662</td>
<td class="gt_row gt_right" headers="stub-2 lr">53%</td>
<td class="gt_row gt_left" headers="stub-2 buy">yes</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 worth">6.087</td>
<td class="gt_row gt_right" headers="stub-3 lr">58%</td>
<td class="gt_row gt_left" headers="stub-3 buy">no</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 worth">5.415</td>
<td class="gt_row gt_right" headers="stub-4 lr">65%</td>
<td class="gt_row gt_left" headers="stub-4 buy">no</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 worth">4.803</td>
<td class="gt_row gt_right" headers="stub-5 lr">73%</td>
<td class="gt_row gt_left" headers="stub-5 buy">no</td>
</tr>
</tbody>
</table>


``` python
worth = [split.price(distortions[f], assets=100).allocated[1].premium for f in FAMILIES]
fig, ax = plt.subplots()
ax.bar(FAMILIES, worth, color="C0", label="value of the cover")
ax.axhline(6.5, color="C1", label="quoted premium")
ax.set_xlabel("distortion")
ax.set_ylabel("premium (currency units)")
ax.set_title("Value of the stop loss to InsCo by distortion")
ax.legend()
```


<figure class="p-figure figure">
<img src="data:image/svg+xml;base64,PHN2ZyB4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjQzMy45OTk2MDlwdCIgaGVpZ2h0PSIyNjIuMTAzODQ0cHQiIHZpZXdib3g9IjAgMCA0MzMuOTk5NjA5IDI2Mi4xMDM4NDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIj4KIDxtZXRhZGF0YT4KICA8cmRmIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgPHdvcms+CiAgICA8dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIj48L3R5cGU+CiAgICA8ZGF0ZT4yMDI2LTExLTI5VDE3OjIxOjAzLjkyODM0MDwvZGF0ZT4KICAgIDxmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZm9ybWF0PgogICAgPGNyZWF0b3I+CiAgICAgPGFnZW50PgogICAgICA8dGl0bGU+TWF0cGxvdGxpYiB2My4xMS4yLCBodHRwczovL21hdHBsb3RsaWIub3JnLzwvdGl0bGU+CiAgICAgPC9hZ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b250LXNpemU6IDExcHg7IGZvbnQtZmFtaWx5OiB2YXIoLS1wLWZvbnQpOyB0ZXh0LWFuY2hvcjogc3RhcnQ7IGZpbGw6IHZhcigtLXAtaW5rKSIgeD0iMzE3LjEyOTYwOSIgeT0iNDAuNTc2NDA2IiB0cmFuc2Zvcm09InJvdGF0ZSgtMCAzMTcuMTI5NjA5IDQwLjU3NjQwNikiPnF1b3RlZCBwcmVtaXVtPC90ZXh0PgogICAgPC9nPgogICAgPGcgaWQ9InBhdGNoXzEwIj4KICAgICA8cGF0aCBkPSJNIDI4Ni4zMjk2MDkgNTcuMDc3MjY2IApMIDMwOC4zMjk2MDkgNTcuMDc3MjY2IApMIDMwOC4zMjk2MDkgNDkuMzc3MjY2IApMIDI4Ni4zMjk2MDkgNDkuMzc3MjY2IAp6CiIgc3R5bGU9ImZpbGw6IHZhcigtLXAtc2VyaWVzLTEpIiAvPgogICAgPC9nPgogICAgPGcgaWQ9InRleHRfMTgiPgogICAgIDx0ZXh0IHN0eWxlPSJmb250LXNpemU6IDExcHg7IGZvbnQtZmFtaWx5OiB2YXIoLS1wLWZvbnQpOyB0ZXh0LWFuY2hvcjogc3RhcnQ7IGZpbGw6IHZhcigtLXAtaW5rKSIgeD0iMzE3LjEyOTYwOSIgeT0iNTcuMDc3MjY2IiB0cmFuc2Zvcm09InJvdGF0ZSgtMCAzMTcuMTI5NjA5IDU3LjA3NzI2NikiPnZhbHVlIG9mIHRoZSBjb3ZlcjwvdGV4dD4KICAgIDwvZz4KICAgPC9nPgogIDwvZz4KIDwvZz4KIDxkZWZzPgogIDxjbGlwcGF0aCBpZD0icGRiOTA1NDFiNzIiPgogICA8cmVjdCB4PSIzNi4xOTk2MDkiIHk9IjIyLjMxODEyNSIgd2lkdGg9IjM5MC42IiBoZWlnaHQ9IjE5OS41ODQiIC8+CiAgPC9jbGlwcGF0aD4KIDwvZGVmcz4KPC9zdmc+" />
</figure>


A plan inside a unit's range, as all three are here, is consistent with some risk appetite. A plan outside the range of every distortion is consistent with none and needs scrutiny. [Portfolio.premium_bounds](../reference/pricing.Portfolio.md#prospicio.pricing.Portfolio.premium_bounds) shows such a plan.

For which distortion to use and how to calibrate it to quotes, see [Risk loads and distortions](risk-loads-and-distortions.md). For capital by unit (section 8.3 of the monograph), see section 5 of [the chapter 9 guide](capital-modeling-monograph-15.md).
