Skip to content

Instantly share code, notes, and snippets.

@bobular
Created March 6, 2018 16:27
Show Gist options
  • Save bobular/ffd25244538db9daa92381b1efe8645c to your computer and use it in GitHub Desktop.
Save bobular/ffd25244538db9daa92381b1efe8645c to your computer and use it in GitHub Desktop.
Slightly more complex pension funding model, which includes career progression
#!/usr/bin/env perl
# -*- mode: cperl -*-
#
# The purpose of this little model is to figure out what kind of
# investment returns the pension fund needs to make in order to meet
# its defined benefits promises.
#
# It assumes a single employee with their own "pot" and a fixed payout
# period. I'm not suggesting euthanasia... Obviously in reality the
# longevity risk is shared by the many thousands of scheme
# members. I'm trying to keep this simple...
#
# Salary progresses through early career to a fixed level until
# retirement. A very simple career-averaged earnings approach is used
# to calculate the pension payout.
#
# This is 100% defined benefit. There is no 55k cap (as found in the
# USS scheme).
#
# ./pension-funding-model-v2.pl 0.04 0.26 0.04 35000 20 60000 20 3 0.5 0.02 25
#
# 0.26 = C, fraction of salary contribution total (employer+employee)
# 0.04 = I, expected annual asset investment return (e.g. 4%)
# 35000 = S, starting salary
# 20 = X, number of years working with linear annual salary increments
# 60000 = T, salary after X years of increments
# 20 = Y, number of years working at fixed salary T until retirement
# 3 = L, salary multiple for lump sum payment
# 0.5 = P, fraction of career-averaged salary paid out in retirement
# 0.04 = J, expected annual asset return in drawdown period*
# 25 = Z, number of years retirement
#
# (* in a large and long-running scheme with good cashflow there is no
# need to de-risk and be more prudent here, but I give the option anyway)
#
# In the example above, with estimated 4% returns from buy-and-hold
# company share investments (reinvesting dividends), the scheme makes
# a 1.7m pound surplus for the fictional employee:
#
## Starting salary was 35000 and after 20y it was 60000
## Career averaged salary over 40 years is 53437
## Pot is 1232367 after 40y contributions at 26% of salary and 4% annual growth of pot
## Lump sum payout of 3 x career avg salary = 160312 upon retirement
## After 25y retirement paying out 50% of career-averaged salary,
## the pot (with 4% annual return) is 1700687
#
# It breaks even comfortably also with 2% annual return on investments.
#
use strict;
use warnings;
my ($contrib, $growth, $start_salary, $years_1, $end_salary, $years_2,
$lump_multiple, $payout, $growth_2, $years_retired) = @ARGV;
my $pot = 0;
my $salary = $start_salary;
my $annual_increment = ($end_salary-$start_salary)/$years_1;
my $sum_salary = 0; # for calculating career-averaged salary
my $total_years = $years_1+$years_2;
for (1 .. $years_1) {
$pot *= 1+$growth;
$pot += $salary*$contrib;
$sum_salary += $salary;
$salary += $annual_increment;
}
for (1 .. $years_2) {
# same as above but without the annual increment
$pot *= 1+$growth;
$pot += $salary*$contrib;
$sum_salary += $salary;
}
printf "Starting salary was %d and after %dy it was %d\n",
$start_salary, $years_1, $salary;
my $career_averaged_salary = $sum_salary/$total_years;
printf "Career averaged salary over %d years is %d\n",
$total_years, $career_averaged_salary;
printf "Pot is %d after %dy contributions at %d%% of salary and %d%% annual growth of pot\n",
$pot, $total_years, $contrib*100, $growth*100;
my $lump_sum = $career_averaged_salary*$lump_multiple;
$pot -= $lump_sum;
printf "Lump sum payout of %d x career avg salary = %d upon retirement\n",
$lump_multiple, $lump_sum;
for (1 .. $years_retired) {
$pot -= $career_averaged_salary*$payout;
$pot *= 1+$growth_2;
}
printf "After %dy retirement paying out %d%% of career-averaged salary, the pot (with %d%% annual return) is %d\n",
$years_retired, $payout*100, $growth_2*100, $pot;
@bobular
Copy link
Author

bobular commented Mar 6, 2018

Known limitations (please report more here or @uncoolbob on Twitter):

No costing of spousal or death-in-service benefits.

My use of the 26% figure implies that all of that goes into funding current pensions. It doesn't... there are fees and deficit contributions and ???. Use 26% with care!

@bobular
Copy link
Author

bobular commented Mar 6, 2018

Here are the results after updating a few of the numbers put into the model, thanks to comments on Twitter.

23% contributions

According to USS 2.1% of the employer contribution goes to "deficit recovery" + approx 0.9% "fees" (that's a bit of a guess, but any more than that would be criminal) - so 26-2.1-0.9 = 23% actually going into the pension pot

1.6x career average salary lump sum

40 years x 3/75

53% career average salary pension

40 x 1/75

Investment growth

Assume CPI + 2% (just plucked out of the air - but a no-brainer to achieve)

./pension-funding-model-v2.pl 0.23 0.02 35000 20 60000 20 1.6 0.53 0.02 25
Starting salary was 35000 and after 20y it was 60000
Career averaged salary over 40 years is 53437
Pot is 717739 after 40y contributions at 23% of salary and 2% annual growth of pot
Lump sum payout of 1 x career avg salary = 85500 upon retirement
After 25y retirement paying out 53% of career-averaged salary, the pot (with 2% annual return) is 111955

So again, the current benefits seem to be easily fundable.

@bobular
Copy link
Author

bobular commented Mar 7, 2018

Another major assumption to make clear...

All inflows are invested and outflows are paid from the matured assets when they are cashed in during years 40-65.

It doesn't take into account cashflow and whether or not the scheme is a Ponzi scheme or not! See https://medium.com/@mikeotsuka/the-importance-of-positive-pension-scheme-cash-flows-6d3f63056fd

@bobular
Copy link
Author

bobular commented Mar 7, 2018

So as pointed out here
https://twitter.com/GreyTranslation/status/971339962162532352?s=19
In theory the long term investment should all work out in the long run to fund the promises made, but you would need buffer assets to let you pay out pensions in the lean times without having to dip into your core assets.

However if 2% growth in theory pays for the benefits we are currently promised (as shown above) then the 4% growth you should get in practice should help build up such a buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment