Project Template: simplelife

simplelife is a project template to build an annual projection model of basic traditional life policies.

A simplelife model projects life insurance cashflows and reserves for policies represented by model points. Projection items include:

  • premium income,
  • investment income,
  • commissions and expenses,
  • benefit outgo, change in reserves.

Required capital and investment assets are not modeled. Input data, such as:

  • model point data,
  • product specs,
  • actuarial assumptions,
  • economic scenarios,

are read from an Excel file.

How to use the template

Create a project folder as explained in Create a Project section. To build the model, simply run simplelife, then move to the interactive mode. In Spyder, you can do so by opening the simplelife and simply run it. After the script is run, the model is accessible as model global variable in the IPython console in Spyder.

You want to make sure the Python session will not terminate after the script is run, in order for you to do manipulate the model.

The model is accessible through the global variable named model. It is a Model object. Some components of the model are also accessible through global variables. These are Space objcets. Model and Space are classes defined in modelx package. For the complete list of model componets available as global variables, see simplelife page.

See simplelife page for further details on the building process,

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

Model structure

The diagram below shows the spaces contained in a simplelife model. Note that the subspaces under Input space are not drawn in the diagram, as they are quite a few. For details on the Input subspaces, see simplelife.build_input page.

../_images/simplelife_drawio.png
simplelife The main module to build a simplelife model.
build_input Module to create Input space and its child spaces from input data.
lifetable Source module to create LifeTables space from.
policy Source module to create Policy space from.
assumptions Source module to create Assumptions space from.
economic Source module to create Economic space from.
projection Source module to create Projection space from.

There are three types of relationships between spaces, namely containment, dependency, and inheritance. This diagram only depicts containment and inheritance relationships, but does not show dependency relationships. Spaces that each module depends on are listed in the ref section on the page of each source module.

Containment
Lines with the filled diamond arrowheads denote that the spaces on the arrowhead ends contain the spaces on the other ends of the lines. If Space A contains Space B, then Space B is a subspace of Space A.
Inheritance
Lines with the triangle arrowheads denote that the spaces on the ends without the arrowheads are derived from the spaces pointed by the arrowheads. If Space B is derived from Space A, then cells, refs and static subspaces of Space A are inherited to Space B.
Dependency
When Space B is dependent on Space A, then cells in Space B refer to members of Space A to calculate their values by their formulas. Dependency is not necessarily the relationship between spaces, but it could be the cells