GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - open-source-modelling/Open_Source_Economic_Model: Asset-liability model (ALM) in Python that projects the investments and liabilities of a life insurer or pension fund.

BranchesTags
Open more actions menu

Latest commit

 

History

675 Commits
675 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
Documentation
Documentation
 
 
Input
Input
 
 
Intermediate
Intermediate
 
 
Logs
Logs
 
 
Output
Output
 
 
images
images
 
 
notebooks
notebooks
 
 
src/osem
src/osem
 
 
unit_tests
unit_tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
ALM.ini
ALM.ini
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Logo

🐍 Open-Source Economic Model (OSEM) 🐍

Tests


Financial institutions such as life insurers or pension funds have a fiduciary duty to manage long-term commitments to their customers. They initially collect premiums/contributions from their clients, and in exchange promise to provide a guarantee or a higher return at a further date. A large part of risk management in such companies is focused on making sure that the invested assets are managed in such a way as to guarantee the honouring of all commitments (pensions, annuities, insurance claims etc.). One such tool is an asset-liability model. Such models try to simulate three things simultaneously:

  • Evolution and performance of company's investments
  • Evolution of liabilities
  • The impact on profitability by different trading strategies in response to outflows and inflows throughout time

Description

The aim of this project is to write an Asset-Liability model that uses agent-based modelling concepts to generate insight on the company's portfolio. All technologies used are open-source and widely used (Python and specific packages such as Pandas, Numpy, Datetime etc.).

Ultimately, OSEM should be able to take as input:

  • Description and size of investments
  • Description of economic factors such as interest rates, credit spreads etc.
  • Description and size of outflows
  • Description of the factor influencing the size and timing of outflows
  • Description of planned new business that a company wishes to include into the projection

OSEM should be able to produce a projection of what would happen to the balance sheet of this company in 5, 10, 20, 50 years.

Methodology

The development of the OSEM model is still very much an ongoing project. However, a draft of the methodology document can be found in the Documentation folder as OSEM pdf or a OSEM Jupyter notebook.

Specific deep dives into topics related to the methodology are available as Jupyter notebooks or PDFs in the notebooks/ directory:

  • Yield-curve calibration/projection Term structure example
  • Equity pricing Equity pricing example
  • Fixed income pricing Bond pricing example
  • Unit-linked liabilities Unit-linked example
  • Trading and rebalancing Trading example
  • Summary charts Summary charts example

See the notebooks/README.md index for the notebook categories and guidance on adding new exploratory work.

Getting started

So far, we have produced a simple example that can be run using the osem package's entry point. It models a small fictional life insurer: 12 government and corporate bonds, 10 equities and cash, about 3.6m in total, backing either a book of 40 unit-linked policies or a pension-annuity run-off, both worth about 3.0m. The company starts with assets at 120% of liabilities. See Input/README.md for the full description of the sample data. This example will grow as more development is committed to the main branch.

The production code lives under src/osem/ as an installable package; main.py there (src/osem/main.py) is the orchestration entry point.

Install and run

From the repository root (Python 3.10+):

pip install -e . && python -m osem.main

This installs osem in editable mode (from pyproject.toml, src-layout) alongside its dependencies, and runs the model as a module. Equivalently, once installed, the osem console script does the same thing:

osem

Results are written to Output/Results.csv, and unit-linked runs also write each policy's path to Output/UL_Policy_History.csv.

Every run also creates Output/Report.html. Open it in a browser to see how the assets compare with what they must cover, what moved the balance in any year, and in unit-linked runs the reserve movement and each policy's value. The report is a single file that works offline. It is rebuilt from the saved csv files, so you can recreate it without running the model again:

python -c "from osem.ReportClass import create_report; create_report('Output')"

A simple summary of what goes into the run and what are the outputs can be found in the Summary pdf

For coding agents

For coding agents, see AGENTS.md at the repository root. It describes the architecture, methodology, and coding conventions agents should follow when editing this project.

Ask to the community

Send us an email at [email protected] with feedback, comments, ideas on what we could do better etc. Do you want to help us on this open source project?

About

Asset-liability model (ALM) in Python that projects the investments and liabilities of a life insurer or pension fund.

qnityconsultants.com/

Topics

actuarialasset-liabilityinsurancemodelling-toolpython

Resources

Readme
MPL-2.0 license
Activity

Stars

30 stars

Watchers

3 watching

Forks

13 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.