Project fastlife

This project includes the fastlife model. The firstlife model calculates the present values of the net insurance cashflows. The calculation results are the same as the model in Project simplelife. However, the fastlife model carries out the calculations for all model points in parallel at the same time, while the calculations in the simplelife model are done separately for each model point. Because the parallel processing is

The values of most Cells for projecting cashflows are pandas Series objects that contain calculation results for all model points:

>>> fastlife.Projection.PV_NetCashflow(0)
Policy
1      8.954018e+03
2      7.511092e+03
3      9.173907e+03
4      7.638071e+03
5      9.418541e+03
           ...
296    2.599794e+06
297    2.298079e+06
298    2.557191e+06
299    2.242406e+06
300    2.510715e+06
Length: 300, dtype: float64

fastlife runs faster than simplelife thanks to powerful vector operations on pandas Series. The blog posts on https://modelx.io/blog linked below discuss the background and performance of fastlife.

Related posts

How to use the project

Create a project folder from IPython in Spyder. as explained in Copying a Library section. Read the model in Spyder by following the steps in Reading a Model section.

The model become accessible as fastlife global variable in the IPython console in Spyder.

There is no explicit ‘Run’ command to run the model. The model calculates its values on the fly, when requested.

Model structure

Composition Structure

The diagram below shows the spaces in the fastlife model.

blockdiag fastlife Projection PV Economic[ScenID] LifeTable [Sex, IntRate, TableID] Input Assumptions Policy

Inheritance Structure

blockdiag PV Projection

Jupyter Notebooks

A live version of the Jupyter notebook below is available online, thanks to Binder.

Launch this sample now!

  • Introduction to fastlife launch binder

Space Details

Input

Common Input Data

LifeTable

Commutation functions and actuarial notations

Economic

Economic Assumptions

PV

Present Value mix-in Space

Projection

Space for cashflow projection.

Policy

Policy data and attributes

Assumptions

Projection Assumptions