/Open_Source_Economic_Model

First open-source asset-liability model.

Primary LanguageJupyter NotebookMozilla Public License 2.0MPL-2.0

Logo

🐍 Open-Source Economic Model (OSEM) 🐍


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 a collection of models using technologies that are open-source and widely used (Pyhon and specific packages such as Pands, 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 pdf-s. The topics covered so far are:

Getting started

So far, we have produced a simple example that can be ran using the script main.py. A hypothetical portfolio of 3 equities and 3 corporate bonds and a single fixed liability cash flow profile. This example will grow as more development is committed to the main branch. To run the example:

  • Download the OSEM repository
  • Open the Anaconda command prompt
  • Make the OSEM repository the root folder
  • Run the script main.py
  • In the folder Output, look at the cash flow time-series

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

Using Copilots for development

If you use copilots to further develope the code, we have started assembling a modelingfile that can be used to refine the prompts. The file is located in the llm_modelfile folder.

Ask to the community

Send us an email at gregor@osmodelling.com with feedback, comments, ideas on what we could do better etc. Do you want to help us on this open source project? Check our wiki page also on GitHub Wiki