Loss reserve analysis

From FDU-INS/Insurance-Skills · View interactive version

Loss reserve analysis is an AI agent skill from the GitHub repository FDU-INS/Insurance-Skills. Perform a loss reserve analysis on P&C insurance loss development triangles. Use this skill whenever the user uploads loss triangles (paid or incurred), Schedule P data, or asks about reserve adequacy, reserve sufficiency, IBNR estimation, loss development analysis, loss reserve review, or ultimate

How to use this skill

Skill file

Loss Reserve Analysis

Purpose

Analyze P&C insurance loss development triangles using standard actuarial reserving methods, flag anomalies, and produce a professional loss reserve analysis report in Excel. This skill applies standard methods described in Friedland's Estimating Unpaid Claims Using Basic Techniques and references relevant Actuarial Standards of Practice (ASOPs) for educational context.

When to Use

Workflow

Step 1: Identify and Parse the Triangle

  1. Check /mnt/user-data/uploads/ for uploaded files
  2. Read the file using the scripts/parse_triangle.py helper
  3. If the data format is ambiguous, ask the user:

Per ASOP No. 23 (Data Quality), Section 3.2 (Selection of Data), consider whether the data is appropriate for the intended analysis. Ask the user about known data issues such as changes in claim coding, coverage triggers, or reopened claims that may affect triangle integrity. See Friedland Ch. 1–4 for background on the claims process, data types, and meeting with management to understand context.

Supported formats:

Sample data (in examples/) for testing all methods:

Step 2: Run the Analysis

Execute the main analysis script:

python scripts/reserve_analysis.py \
  --input <path_to_triangle_file> \
  --sheet <sheet_name_if_excel> \
  --type <paid|incurred|both> \
  --dev-periods <months|years> \
  --premium <path_or_value_if_available> \
  --output /home/claude/reserve_report.xlsx

The script runs these methods:

  1. Chain Ladder (Volume-Weighted) — Standard link ratio method using volume-weighted average factors (Friedland Ch. 7; foundational development method per ASOP No. 43 Section 3.6.1)
  2. Chain Ladder (Simple Average) — Arithmetic average of age-to-age factors for comparison
  3. Bornhuetter-Ferguson — If earned premium is provided; blends expected loss ratio with chain ladder (Friedland Ch. 9; Bornhuetter & Ferguson, PCAS 1972; incorporates credibility concepts per ASOP No. 25)
  4. Cape Cod — If earned premium is provided; derives expected loss ratio from the data itself (Friedland Ch. 10; Stanard, PCAS 1985)
  5. Expected Loss Ratio — If earned premium and an a priori loss ratio are provided (Friedland Ch. 8; useful when development data has limited credibility per ASOP No. 43 Section 3.6.1)

Step 3: Review Diagnostics

The script also produces diagnostic exhibits. Review these and call out to the user:

These diagnostics align with ASOP No. 43 Section 3.7.1 (Reasonableness), which calls for the actuary to assess whether results are reasonable. The calendar year test and outlier analysis help identify data irregularities referenced in ASOP No. 23 Section 3.3 (Review of Data). See also Friedland Ch. 6 for discussion of the development triangle as a diagnostic tool and Werner & Modlin Ch. 6 for loss development context in ratemaking.

Step 4: Rebuild Workbook with Formula Transparency

The script produces a workbook with static values. Before presenting, rebuild the workbook so every derived cell uses a live Excel formula with a cached calculated value. This is the minimum transparency standard for actuarial work — a reviewer must be able to click any cell and trace the calculation back to the source triangle.

What must be a formula (not a static value):

What stays as static values (inputs, not derived):

Important: Every formula cell must also have a cached calculated value so numbers display correctly in all viewers (web preview, Excel, Google Sheets). Use xlsxwriter's write_formula(row, col, formula, format, result) or equivalent approach that writes both the formula and the pre-calculated value.

Step 5: Interpret Results and Present

After running the analysis:

  1. Copy the output Excel to /mnt/user-data/outputs/
  2. Present the file to the user
  3. Provide a narrative summary that includes:

Important tone guidance: This is a quick check, not a full reserve study. Always caveat that:

Step 5: Interactive Follow-Up

After presenting results, offer the user options to:

When adjusting selections, note that ASOP No. 43 Section 3.6.7 (Changing Conditions) and 3.6.6 (External Conditions) may affect development patterns and tail behavior. ASOP No. 25 provides guidance on credibility weighting when blending methods. Tail factor considerations are discussed in Friedland Ch. 7 as part of the development technique.

Key Actuarial Concepts (Reference)

Read references/methods.md for detailed formulas and implementation notes on each method if needed during development or debugging.

Error Handling

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.