計算複利頻率
不同的複利頻率會大幅影響你的資金成長。在這個練習中,我們要比較三個不同的儲蓄帳戶,它們各自提供不同的年利率與複利頻率,看看哪一個最能讓你的資金成長。
每個例子中,你都從 10,000 美元的初始投資開始,投資 10 年。numpy_financial 已替你匯入為 npf。
本練習屬於課程
使用 Python 進行債券評價與分析
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Calculate the growth of USD 10,000 invested in the first account
account_1 = npf.fv(rate=____, nper=____, pmt=____, pv=____)
# Print the value of the first savings account
____