开始使用免费开始使用

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.

本练习是课程的一部分

Life Insurance Products Valuation in R

查看课程

练习说明

  • Define kpx for a 40-year-old female.
  • Create discount_factors which discount payments at time zero (age 40) up to time length(kpx) - 1 at rate 3%.
  • Assign the pension payments to benefits. Make sure this vector has the same length as kpx.
  • Compute the single_premium as the sum of elementwise product of benefits, discount_factors and kpx. Print out the result.

交互式实操练习

通过完成这段示例代码来试试这个练习。

# 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
编辑并运行代码