Rscripts, Algorithms and Slides
Over the course of many research projects, I have created a variety of Rscripts (computer code) and related algorithms that I have made available for download from this webpage. I also use this material for teaching my advanced course on Retirement Income Models and you are free to download and use them and the associated lecture slides included in the zip files.
For those interested in the original textbook click here
For those interested in the solution manual click here

FINE4060 slides and scripts for lecture #1
Download a zipped file which includes the PDF slides used in lecture #1, where I introduced the types of problems we will solve in the course, instructions on how to download and install Rstudio together with some basic Rscripts.

FINE4060 slides, scripts and data for lecture #2
Download a zipped file which includes a (hypothetical) personal finance dataset in csv format, a number of Rscripts and the PDF slides used for lecture #2, in which we codeup a basic model of spending and saving over the lifecycle and compare with the data.

FINE4060 slides and scripts for lecture #3
Download a zipped file which includes a number of Rscripts and the PDF slides used for lecture #3, in which we discuss how to model and measure the longevity of a portfolio subject to withdrawals, basic Monte Carlo (MC) simulations and the sequence of returns (SoR) effect.

FINE4060 slides, plot scripts and data for lecture #4
Download a zipped file which includes a number of plot Rscripts, data files and the PDF slides used for lecture #4, in which we introduce and discuss basic cohort mortality tables, the implied mortality rates and the concept of a random remaining lifetime, all in discrete time. And, some financial economics at the very end.

FINE4060 slides and scripts for lecture #5
Download a zipped file which includes a number of Rscripts, data files and the PDF slides used for lecture #5, in which we discuss period vs. cohort mortality tables, the GompertzMakeham law of mortality, estimating parameters via regression, projection factors and reduction scales, the Compensation Law of Mortality (CLaM), simulating random lifetimes and a brief discussion of biological versus chronological age.

FINE4060 slides and scripts for lecture #6
Download a zipped file which includes a number of Rscripts, data files and the PDF slides used for lecture #6, in which discuss the lumpsum versus pension annuity dilemma, the valuation of life annuities under the Gompertz law of mortality, the general valuation of longevitycontingent claims via the Binomial distribution, the Law of Large Numbers and finally, we locate some mortality credits.

FINE4060 slides and scripts for lecture #7
Download a zipped folder which includes the PDF slides used for lecture #7, in which I discuss modeling Defined Benefit (DB) versus Defined Contribution (DC) pensions, codingup Monte Carlo simulation of DC account values at retirement in R, discussion of typical DB benefit formulas and whether or not to delay your pension (e.g. CPP or OAS) in exchange for higher benefits in the future, all under idealized conditions.

FINE4060 slides and scripts for lecture #8
Download a zipped folder which includes PDF slides and Rscripts used for lecture #8, in which I discuss and solve the (FisherYaari) retirement lifecycle model (LCM) with Gompertz mortality, the optimal consumption spending rate, and the wealth depletion time (WDT) in the presence of pension income.

FINE4060 Homework Assignment and Projects (FINAL)
Download a zipped folder which contains all the homework assignment questions with the final project used in the Winter 2019 semester plus an advanced reading list. The folder also contains a complete collection of all the Rscripts with a few extra ones I have used in some recent technical papers, all in one centralized location. (Note there are only 8 weeks of formal lecture notes. The other sessions were used to solve problems and for guest lectures.)

Is Covid19 a Parallel Shock to the Term Structure of Mortality? Applications to Annuity Valuation
This presentation focuses on how to think about and model Covid19 in continuoustime, from the perspective of lifecycle financial economics and retirement income planning. To begin with, it hypothesizes that total mortality rates during the coronavirus period have been strictly proportional to normal mortality rates, which effectively increase biological ages across the curve, otherwise known as a parallel shift of the (Gompertzian) term structure. The presentation then goes on to provide some preliminary empirical evidence from the UK and Europe corroborating the parallel shift hypothesis, and discusses the implications of a (arguably, convenient) parallel shift on the utilitybased valuation of life annuities. The main practical message here is that longevity insurance becomes more – as opposed to less – valuable, even if life expectancies decline. The presentation concludes by proposing the socalled compensation law of mortality (CLM) as a possible alternative to a parallel shift, and briefly discusses how to merge a CLM into a stochastic lifecycle model of investment and consumption. These slides are from the One World Actuarial Research Seminar (OWARS) Lecture, delivered on 20 May 2020, and was intended to provide an overview of ongoing research work with various coauthors and investigators.
Note that this version contains lowresolution images to reduce the size of the PDF, but a highresolution version is available from the author’s webpage at Amazon, here
By downloading these files the user understands and agrees that Moshe Milevsky makes no representations or warranties whatsoever regarding the products, developments, documentation, or any other materials or services provided hereunder, and specifically disclaims any and all other warranties, whether expressed or implied.