SCR Class

A class to calculate the Solvency Capital Requirement (SCR) for a non-life insurer using the SAM standard formula.

This class serves as the main orchestrator for the SCR calculation process, coordinating various risk modules and aggregating results. It handles data import, calculation steps, and result export.

The class is split out across a couple different modules:
  • scr.py: The main class file

  • aggregation.py: Aggregation functions for the SCR class

  • lacdt.py: Loss Absorbing Capacity of Deferred Tax (LACDT) calculations

  • diversification.py: Diversification calculations

  • info.py: Information functions for the SCR class

  • solver.py: Solver functions for the SCR class, currently under development

scr

Support Modules

Detailed below are the various supporting modeuls (and functions) for the SCr class detail in the module scr.

aggregation

diversification

shapely_calc(scr)[source]

info

SCR Info Module

This module provides functionality to extract and organize information about the structure and content of an SCR (Solvency Capital Requirement) object.

The module contains functions to recursively extract information from nested dictionaries and compile it into a pandas DataFrame for easy analysis.

Functions:

extract_dict_info: Recursively extracts information from nested dictionaries. info: Compiles information about an SCR object into a DataFrame.

Dependencies:

pandas numpy

info(sam_scr)[source]

Compile information about an SCR object into a DataFrame.

This function extracts information from the ‘classes’ and ‘output’ attributes of an SCR object and compiles it into a pandas DataFrame for easy analysis.

Args:

sam_scr (Any): An SCR object containing ‘classes’ and ‘output’ attributes.

Returns:

pd.DataFrame: A DataFrame containing information about the structure and content of the SCR object. The DataFrame has the following columns: [“Module”, “Dictionary”, “Level”, “Object Type”, “Rows”, “Columns”, “Size”]

Raises:

AttributeError: If the input object doesn’t have the expected attributes. TypeError: If the ‘classes’ attribute is not a dictionary.

Parameters:

sam_scr (Any)

Return type:

DataFrame

lacdt

f_lacdt_calculation(sam_scr, base_scr)[source]

Aggregate the lacdt amounts.

solver