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.
See also
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.
See also
The economic Library for a Hull-White model based on modelx
Project smithwilson for a primitive Smith-Wilson implementation based on modelx
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.
Additional packages used
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 |
---|---|---|
Interpolation and extrapolation of missing interest rates |
||
Automatic calibration of the stationary bootstrap algorithm |
||
Resampling procedure for weakly dependent stationary observations |
||
Calibration of the Smith & Wilson’s alpha parameter |
||
Simple function to generate correlated Brownian motion in multiple dim. |
||
Nelson-Siegel-Svansson model for approximating the yield curve |
||
Black&Scholes model for pricing option contracts |
||
Calculation of the risk free rate from the monthly EIOPA publication |
||
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 |