# Analytics Toolkit

> The analytical foundations of reinsurance risk: trial-based simulation, exceedance probability curves, and the core risk metrics every application depends on.

Source: https://reinsurance.dev/toolkit/

The [Foundations](https://reinsurance.dev/foundations/) chapter established that **reinsurance is a capital allocation problem driven by tail risk and structured through contracts.**

- It is a **capital allocation problem** because every reinsurer has finite capital and must decide how to deploy it across contracts, perils, and geographies to maximise return
- It is **driven by tail risk** because the losses that matter most (the ones that threaten solvency) are rare, extreme events in the tail of the loss distribution
- It is **structured through contracts** because the contract is the atomic unit of risk transfer: every business decision, every metric, every allocation ultimately flows through contract terms applied to trial losses

This chapter gives you the analytical toolkit to work with that problem: the data structures, the distributions, and the metrics that every downstream application depends on. It is the measurement layer: how to read a loss distribution and extract the numbers that drive decisions. The next chapter, [Financial Modelling](https://reinsurance.dev/financial-modelling/), is the transformation layer: how contracts reshape those distributions.

```mermaid
graph TB
    Y[Year event loss table<br/>occurrence-level loss rows]:::Losses -->|grouped by trial_id| T[Trials<br/>N equiprobable simulated futures]:::Process
    T --> E[Exceedance probability curve<br/>sorted trial losses]:::Process
    E --> M[Metrics<br/>EL · VaR · TVaR]:::Metric
    M -.->|Financial Modelling| C[Contracts transform<br/>the distribution]:::Contract

    classDef Losses fill:#F5CEBC,stroke:#B16C4B,stroke-width:1.5px,color:#2B2620
    classDef Contract fill:#BFDBF8,stroke:#4F84BA,stroke-width:1.5px,color:#2B2620
    classDef Process fill:#F7CBCB,stroke:#B46669,stroke-width:1.5px,color:#2B2620
    classDef Metric fill:#BDE2CB,stroke:#459269,stroke-width:1.5px,color:#2B2620
```

By the end, you will be able to:

- Explain what a trial is and why trial-based simulation is the foundation of catastrophe risk analytics
- Read and construct [exceedance probability (EP) curves](https://reinsurance.dev/glossary/#ep-curve-exceedance-probability-curve)
- Compute the core risk metrics: [expected loss (EL)](https://reinsurance.dev/glossary/#el-expected-loss), [Value at Risk (VaR)](https://reinsurance.dev/glossary/#var-value-at-risk), and [Tail Value at Risk (TVaR)](https://reinsurance.dev/glossary/#tvar-tail-value-at-risk)
- Interpret what each metric says about the tail of a loss distribution
- Say why this site holds capital against TVaR rather than VaR, and work the counterexample that shows VaR failing
- Compute the metrics a contract needs beyond the core three: attachment and exhaustion probability, standard deviation, window TVaR

The chapter ships seven interactive elements: a Trial 9 timeline, the [aggregate exceedance probability (AEP)](https://reinsurance.dev/glossary/#aep-aggregate-exceedance-probability) curve and the EP curve explorer, a chart for each core metric, and a metrics explorer over the whole Caldera Re dataset. Four of them take inputs you can vary.

This chapter assumes college-level probability and statistics (expect quantiles, empirical distributions, a little set notation, and the floor function), but no actuarial background and no measure theory. Every formula comes with a plain-English restatement and the line of code that computes it.

We continue with the **[Caldera Re](https://reinsurance.dev/caldera-re/)** example. The company and its six contracts come from [Foundations](https://reinsurance.dev/foundations/) and the [Caldera Re appendix](https://reinsurance.dev/caldera-re/); the trial loss data behind every number in this chapter is introduced in [the trial worldview](https://reinsurance.dev/toolkit/trials/#the-caldera-re-yelt). The conventions this chapter introduces are indexed on [Scope, conventions & assumptions](https://reinsurance.dev/conventions/).

## Chapter outline

1. [**The trial worldview**](https://reinsurance.dev/toolkit/trials/): What trials and events are, and why they are the foundation
2. [**Exceedance probability curves**](https://reinsurance.dev/toolkit/distributions/): What EP curves represent, how to build them, and the occurrence and aggregate forms
3. [**Metrics**](https://reinsurance.dev/toolkit/metrics/): EL, VaR, TVaR and the metrics that drive decisions

Each section builds on the previous, toward this chapter's closing thesis: **once you can measure a loss distribution, the next question is where those distributions come from and how contracts reshape them.** The [Financial Modelling](https://reinsurance.dev/financial-modelling/) chapter answers it, and argues that a handful of operations on trial losses can express the loss side of the core property-cat structures (quota share, catastrophe excess of loss, aggregate excess of loss) and of the programs and portfolios built from them.
