Blog posts

Cash flow model output

In this post, we will discuss the output of a cash flow model using the cashflower package in Python. In particular, we will check how to create grouped output, create an output only with a subset of columns and save a custom output.


List of content:

  1. Grouping
  2. Subset of variables
  3. User-defined output

Grouping

The output of a cash flow model is a table where rows represent periods and columns represent variables. Data are the values of the variables for the given period.

The structure of the output depends …

Bond

A bond is a type of financial asset that represents a loan made by an investor to a borrower, typically a company or a government. When an investor buys a bond, they are essentially lending money to the borrower in exchange for regular coupon payments and a promise to repay the initial amount (nominal) at a future date, known as the bond's maturity date.

Bonds come in different types and are typically issued with a fixed coupon rate, which is determined at the time of issuance. The coupon payments are usually made periodically, such as monthly or annually, and the …

Life annuities

A life annuity is a series of payments while a given life survives.

Life annuities play a major role in life insurance. Life insurances are usually purchased by a life annuity of premiums rather than by a single premium. The amount payable at the time of claim may be converted through a settlement option into some form of life annuity for the beneficiary.

Annuities are also central in pension systems as our retirements have a form of an annuity. They also have a role in disability and workers' compensation insurances.

A life annuity may be termporary, that is, limited to …

Life insurance

Life insurance aims to reduce the financial impact of the event of untimely death. The life insurances are long-term in nature which provides a significant element of uncertainty.

The size and time of payment in life insurance depend on the time of death of the insured. The actuarial cash flow models are built as a function of the t variable.

We usually consider life insurance as insurance on human lives, but the same idea can apply to objects, such as: equipment, machines or loans.

There are multiple types of life insurance. We will build simple models in Python using the …

Model variables

The core of a financial cash flow model lies in its model variables. In this blog post, we will delve into the intricacies of different types of model variables and demonstrate how to create them using the cashflower package.


List of content:

  1. Defining model variables
  2. Time-dependent variable
  3. Constant variable

Defining model variables

To define a model variable, follow these steps:

  1. define a function with the t parameter (or without any parameters),
  2. decorate the function with @variable().

Model variables can produce results per time and model point. While most are time-dependent, some remain constant throughout. Let's explore both types. …