# The economic_curves library#

## Overview#

This library includes Python scripts and notebooks that contain practical algorithms for modeling economic scenarios, many of which are relevant to regulatory requirements in UK and EU countries under the Solvency 2 regime.

This library was based on insurance_python, a library in an external project, the Actuarial Algorithms, developed and maintained by Qnity Consultants and Gregor Fabjan.

## How to Use the Library#

As explained in the Copying a Library section, create you own copy of the economic_curve library. For example, to copy as a folder named curves under the path C:\path\to\your\, type below in an IPython console:

>>> import lifelib

>>> lifelib.create("economic_curves", r"C:\path\to\your\curves")


This library does not use modelx.

This library uses the following packages. Most of the packages are pre-installed in major Python distributions, but if any of them are missing, install them by pip or conda manually.

## Algorithms available#

Scripts and notebooks for each algorythm are put in a sub-folder dedicated for the algorythm in this library.

Algorithm (Folder)

Source

Description

smith_wilson

Technical-documentation

Interpolation and extrapolation of missing interest rates

stationary_bootstrap_calibration

Whitepaper-2004

Automatic calibration of the stationary bootstrap algorithm

stationary_bootstrap

Politis-Romano-1994

Resampling procedure for weakly dependent stationary observations

bisection_alpha

Technical-documentation

Calibration of the Smith & Wilson’s alpha parameter

correlated_brownian_motion

Wiki Brownian motion

Simple function to generate correlated Brownian motion in multiple dim.

NelsonSiegelSvensson

BIS whitepaper

Nelson-Siegel-Svansson model for approximating the yield curve

black_scholes

Wiki Black&Sholes

Black&Scholes model for pricing option contracts

EIOPA_smith_wilson_test

EIOPA RFR website

Calculation of the risk free rate from the monthly EIOPA publication

Metropolis_Hastings

Original work by OSM

Bayesian maximum likelihood of a Black Sholes stochastic scenario generator

## Algorithms planned#

New suggestions for algorithms are welcome. If anybody is interested in publishing an algorithm they implemented, or help with the project, contact the original authors, or start a discussion at lifelib Discussions.

Algorithm

Source

Description

Matrix on fraction

TBD

Heuristics for calculating transition matrices on fractions of power

G2++ with piec cons vol

TBD

Calibration of a G2++ model with piecwise constant volatility

Carter-Lee model

TBD

Simple stochastic mortality model

Metropolis-Hastings

TBD

Sampling of probability distributions