The economic Library#

modelx

Overview#

The economic library is for modeling economic scenarios. Currently, the library includes three models:

BasicHullWhite simulates the short rate of the Hull-White model. BasicG2PP generates risk-neutral interest rate scenarios from the G2++ model, fitted to an initial yield curve, for calculating the time value of options and guarantees (TVOG). CashValue_ME_G2PP calculates the TVOG of savings policies with a maturity guarantee under those scenarios.

Todo

This library is in its early alpha release stage, and more contents will be added in near future.

How to Use the Library#

As explained in the Copying a Library section, Create you own copy of the economic library. For example, to copy as a folder named economic under the path C:\path\to\your\, type below in an IPython console:

>>> import lifelib

>>> lifelib.create("economic", r"C:\path\to\your\economic")

Jupyter Notebooks#

Library Contents#

File or Folder

Description

BasicHullWhite

The BasicHullWhite model.

BasicG2PP

The BasicG2PP model.

CashValue_ME_G2PP

The CashValue_ME_G2PP model.

g2pp_input.xlsx

Excel input read by BasicG2PP and CashValue_ME_G2PP

hull-white-simulation.ipynb

Jupyter notebook Overview of BasicHullWhite

g2pp-simulation.ipynb

Jupyter notebook G2++ scenarios from BasicG2PP

g2pp-tvog.ipynb

Jupyter notebook TVOG of a maturity guarantee under G2++ scenarios

plot_ex1_short_rate_paths.py

Python script for Short rate paths

plot_ex2_short_rate_mean_variance.py

Python script for Short rate mean and variance

plot_ex3_disc_factor_convergence.py

Python script for Discount factor convergence

plot_ex4_g2pp_rate_fan.py

Python script for G2++ short rate and 10-year yield

plot_ex5_g2pp_martingale.py

Python script for G2++ martingale tests