Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actuarial Math, Visualized

Short mathematical animations that explain how actuarial models work and why their assumptions matter.

Episode 01: Lee-Carter mortality forecasting

Lee-Carter mortality forecasting, visualized

Watch the 42.8-second video — 1080 × 1350, 30 fps.

The first video follows the complete Lee-Carter idea in under one minute:

  1. mortality rates form an age-by-year surface;
  2. a_x describes the average mortality pattern by age;
  3. b_x measures how strongly each age reacts to the time trend;
  4. forecasting k_t produces a future mortality curve;
  5. those projections feed survival and annuity calculations.

The scene fits the model with singular value decomposition. It uses a deterministic, illustrative mortality surface so the repository remains self-contained and does not redistribute licensed Human Mortality Database data.

The model is

log m(x,t) = a(x) + b(x) k(t) + epsilon(x,t)

with the usual identification constraints sum(b_x) = 1 and mean(k_t) = 0.

Render locally

Requirements: Python 3.11+ and FFmpeg.

py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m manim --config_file manim.cfg `
  src\actuarial_math_visualized\scene.py LeeCarterVisualized

The final social-media render is copied to assets/lee-carter-visualized.mp4.

Project map

src/actuarial_math_visualized/model.py  Lee-Carter fit and forecast
src/actuarial_math_visualized/scene.py  4:5 Manim animation
tests/test_model.py                     numerical contract tests
assets/                                 final video and thumbnail

Created by Amine Manai. MIT licensed.

About

Short Manim explanations of actuarial mathematics, starting with Lee-Carter mortality forecasting.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages