Python으로 배우는 채권 가치평가와 분석
Joshua Mayhew
Options Trader
deposit_fv = 1000 * (1 + 0.03) ^ 3topup_1_fv = 100 * (1 + 0.03) ^ 2topup_2_fv = 100 * (1 + 0.03) ^ 1topup_3_fv = 100print(deposit_fv + topup_1_fv + topup_2_fv + topup_3_fv)
1401.82
print(deposit_fv + topup_1_fv + topup_2_fv + topup_3_fv - 1000 - 100 - 100 - 100)
101.82
import numpy_financial as npf?npf.fv
Signature: npf.fv(rate, nper, pmt, pv)Given: * an interest `rate` compounded once per period, of which there are* `nper` total* a (fixed) payment, `pmt`* a present value, `pv`Return: the value at the end of the `nper` periods
npf.fv(rate=0.03, nper=3, pmt=-100, pv=-1000)
1401.82
10년 동안 $1,000 투자(추가 납입 없음) 시 얼마가 될까요?
# 연복리 사용
npf.fv(rate=0.05, nper=10, pmt=0, pv=-1000)
1628.89
# 월복리 사용
npf.fv(rate=0.05/12, nper=10*12, pmt=0, pv=-1000)
1647.01
# 일복리 사용
npf.fv(rate=0.05/365, nper=10*365, pmt=0, pv=-1000)
1648.66
Python으로 배우는 채권 가치평가와 분석