通膨調整後的淨資產
如果每年儲蓄 30%,你的模擬顯示最終可以累積 $896,962.66。雖然還不是百萬富翁,但表現已經很不錯了!
為了簡化,我們假設你依照預算成功存到 $900,000。
不過,如果你在 15 年後退休呢?15 年後,$900,000 的實際價值會是多少?
本練習屬於課程
Python 金融概念入門
練習說明
- 將
future_net_worth設為 $900,000。 - 將年通膨率設為 2.5%。不要以每月複利計算通膨。
- 使用
.pv()計算 15 年後你的淨資產的現值。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
import numpy as np
# Set your future net worth
future_net_worth = ____
# Set the annual inflation rate to 2.5%
annual_inflation = ____
# Calculate the present value of your terminal wealth over 15 years
inflation_adjusted_net_worth = ____(rate=annual_inflation, nper=____, pmt=0, fv=-1*____)
print("Your inflation-adjusted net worth: $" + str(round(inflation_adjusted_net_worth, 2)))