1. Learn
  2. /
  3. Courses
  4. /
  5. Life Insurance Products Valuation in R

Connected

Exercise

A function to price a life annuity

Cynthia's internship supervisor does not have much experience with R. He asks her to write an R function that calculates the EPV of a (whole) life annuity due on \((x)\) for a given constant interest rate \(i\) and life table.

Since the benefit is constant at 1 EUR, there is no need to take it explicitly into account in the calculations.

Instructions

100 XP
  • Write a function life_annuity_due() that calculates the EPV of a whole life annuity due for input arguments age, interest rate i and life_table.
  • Apply life_annuity_due() to compute the EPV of a life annuity due for (20) at rate 2%. Use the 1999 Belgian period life table for females which is preloaded as life_table.
  • Find out how the EPV changes if the interest rate increases to 5% (keeping the age at 20). And what if the age changes to 65 (keeping the interest rate at 2%)?