Mortality Forecasting in Python (P2)

Discover how to use advanced techniques in Python, including time series analysis and the Lee-Carter model, data cleaning, and visualisations to forecast mortality rates in this end to end walkthrough of mortality modelling.

Introduction

If you’re looking to learn how to utilise advanced applications of Python in an insurance context, this course is ideal for you. An individual subscription gives you 3 months’ online access to:

  • Course materials
  • A personal coding environment through Jupyter Notebooks
  • Discussion forums to engage and collaborate with like-minded individuals
  • Instructional videos
  • Option to ask tutors questions through forums and Q&A sessions
  • Hands-on practical exampleslinked to actuarial work
  • On demand access

As Well As

Our Data Science Resource Library which features Actuartech and Industry specific curated additional content to assist you on your data science journey.

You can also request to access to a coding project to practice the skills you learn in this course.

A IT engineer working on a project.
Someone working on an online course at their desk.

Pick from any of our introductory or advanced courses with bespoke insurance and actuarial specific case studies.

Our platform is easy to use and embeds the coding environment and learning material in one place to enable you to apply data science hands-on.

We provide case studies and projects relevant to actuarial work, and based on relevant datasets provided. You have the option to interact and network with your peers.

Overview

This case study aims to show how we can analyse and forecast mortality in old ages by illustrating how the Lee-Carter model and Cairns-Blake-Dowd model can be fitted on mortality data. As the packages for fitting Lee-Carter and Cairns-Blake-Dowd are fairly scarce, we will be building the models from the ground-up.

Using Python techniques discussed in our foundations in Python course, we are able to construct an algorithm and generalise it using classes as well as generate forecasts. The end result is a set of usable functions and classes (built from first principles) that the user can apply to other mortality data.

This course aims to:

  • provide users with a deeper understanding of how a Lee-Carter and a Cairns-Blake-Dowd model can be fitted and where they may be appropriate;
  • provide general guidance on how to break down an algorithm and replicate it in Python, then re-package itinto usable pieces of software (noting that this approach is not defined by any packages or single language, as long as the language has a matrix or 2D-array functionality, the approach can be translated);
  • and to introduce users to recurrent neural networks in the form of Long Short Term Memory (LSTM) neural networks.

We explore Long Short Term Memory (LSTM) neural network approaches to time series forecasting using different packages. The results from the LSTM are compared to the Lee-Carter model’s random walk forecasting technique.

If you're not already familiar with Python, we recommend that you start with our Foundations in Python course.

Get started

Mortality Forecasting in Python

Sign up for a free preview of this advanced python case study

Free Preview

Preview

£150 once-off (3-month access)

Enroll Today

Course Structure

In Chapter 1 we define the problem we wish to solve and provide background into the models we will be fitting.

In Chapter 2 we outline the relevant packages we will be using and we explore the mortality dataset by validating that  it is complete before continuing with visualisations.

Chapter 3 sees us outlining, from first principles, how we fit the Lee-Carter and Cairns-Blake-Dowd mortality models. We collect the algorithms into a single class that can be called (per model) which makes analysis easier than re-running multiple code blocks.

In Chapter 4 we use deterministic techniques, and we forecast both the Lee-Carter and Cairns-Blake-Dowd fitted models. We then explore simple stochastic techniques by adding a variance component.

Lastly, in Chapter 5 we conclude with an introduction to LSTM techniques to perform time series forecasting and compare these techniques to the Lee-Carter model.

A person showing different sections of an online course

Who's this course suitable for?

  • Individuals with a good grasp on the foundations of Python.
  • Individuals curious about building algorithms from first principles.
  • Individuals interested in learning the fundamentals of LSTM neural networks and deep learning, particularly within an actuarial context.

Why is this topic important?

  • A systematic approach to deconstructing an algorithm and replicating it in Python allows students to use it to solve future problems.
  • Mortality forecasting techniques have implications on reserving, pricing, risk management, and policy making.
  • The course allows students to gain insight into which model is most suitable by enhancing their understanding of the various models.

Short note to say really enjoyed today’s webinar. It had a very clear message. […] fully in agreement with the comments that it is imperative we maintain our professional and ethical stance at all times if we want to continue to be trusted and relied on.

Webinars

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Heading

Short note to say really enjoyed today’s webinar. It had a very clear message. […] fully in agreement with the comments that it is imperative we maintain our professional and ethical stance at all times if we want to continue to be trusted and relied on.

Webinars

I just wanted to say what an interesting presentation that was. Thank you so much for taking the time to put this on for us, it is very much appreciated by all – especially the flexibility around hosting as a webinar instead of the original [in-person] format. It worked very well indeed!

Webinars

I think I’m [one of the first actuaries in my area] who are pointing towards Data Science, creating the new [role] of Actuarial data Scientist. For this reason i [sic] decided to follow a post graduate master in Business Intelligence and Big data analytics. I'm actively following your company and i [sic] think it is one of the best Actuarial consulting company [sic] who [sic] is pointing towards data Science!

Webinars

I love your videos - being free and accessible really helped me. The Q&A session was fantastic! It always comes down to execution and I feel this should always accompany your presentations - answering the question of how will your participants use what you give them. Keep up the great work!

Round Table

Thank you for having me along. I really found it the most motivating conversation I’ve had in a while, and made me think about what I’m trying to achieve within this area. We all need evenings like that to get some perspective on what we *think* is going on and what actually is. It was a very good evening.

Round Table

It was a really good introduction to Data Science and afterwards I felt that I now have a platform that I could use to further my understanding in this area.

Webinars

I am really happy to have been part of the talk. It was very insightful and please keep doing more of this. I am a data science student currently but I have an actuarial background. I worked in life insurance for about 5 months before resigning to do my masters in Data science so that I blend the actuarial world and Data science together. The talk gave me perspective. Even suggested some potential topics for my Thesis.

Webinars
Get started

Mortality Forecasting in Python

Sign up for a free preview of this advanced python case study

Free Preview

Preview

£150 once-off (3-month access)

Enroll Today

Interested in Corporate Training?

We have tailored packages available to ensure that corporate teams have the option to attend structured live lessons by our tutors, and the option to request a practical assignment and bespoke feedback. Invoicing option available.