A retirement plan for Miss Cathleen
As a final assignment during her summer internship Cynthia is asked to do some calculations for Miss Cathleen. Miss Cathleen is a teacher, aged 40, who is planning for retirement. She wants to buy an annuity that provides her 18,000 EUR annually for life, beginning at age 65. Nothing is paid in case of death before 65. The figure below depicts the retirement plan for Miss Cathleen.
The one-year survival probabilities px
are again preloaded.
This exercise is part of the course
Life Insurance Products Valuation in R
Exercise instructions
- Define
kpx
for a 40-year-old female. - Create
discount_factors
which discount payments at time zero (age 40) up to timelength(kpx) - 1
at rate 3%. - Assign the pension payments to
benefits
. Make sure this vector has the same length askpx
. - Compute the
single_premium
as the sum of elementwise product ofbenefits
,discount_factors
andkpx
. Print out the result.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Survival probabilities of (40)
kpx <- c(___, ___(px[(___):___]))
# Discount factors (to age 40)
discount_factors <- (1 + ___) ^ -(0:(___))
# Pension benefits
benefits <- c(rep(___, ___), rep(___, length(kpx) - 25))
# The single premium
single_premium <- ___
single_premium