開始使用免費開始

儲蓄計畫的存款

現在你已經定義好變數 discount_factorsdepositspayments,可以利用存款(紅色現金流)與付款(藍色現金流)之間的精算等價關係,來決定每年儲蓄存款的金額 $K$。

本練習屬於課程

以 R 估值人壽保險商品

檢視課程

練習說明

  • depositsdiscount_factors 逐項相乘後再以 sum() 加總,計算存款型態的現值。
  • paymentsdiscount_factors 相乘並加總,計算付款型態的現值。
  • 依據精算等價的概念,前 4 年的每年存款 K 可由 PV_payment 除以 PV_deposit 得到。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Calculate the present value of the deposits
PV_deposit <- ___(___ * ___) 

# Calculate the present value of the payments
PV_payment <- ___(___ * ___) 

# Calculate the yearly deposit K in the first 4 years
K <- ___
K
編輯並執行程式碼