Python으로 배우는 채권 가치평가와 분석
Joshua Mayhew
Options Trader
import numpy_financial as npf
?npf.nper
Signature: npf.nper(rate, pmt, pv, fv=0) Compute the number of periodic payments.Parameters rate : 기간별 이자율pmt : 지급액pv : 현가fv : (선택) 미래가치
import numpy_financial as npf
npf.nper(rate=0.05/12, pmt=-270, pv=0, fv=7000)
24.67
import numpy_financial as npf
?npf.pmt
Signature: npf.pmt(rate, nper, pv, fv=0) Compute the payment against loan principal plus interest.Given: * an interest `rate` compounded once per period, of which there are* `nper` total* a present value, `pv` (e.g., an amount borrowed)* a future value, `fv` (e.g., 0)Return: the (fixed) periodic payment.
import numpy_financial as npf
npf.pmt(rate=0.035/12, nper=10*12, pv=275000, fv=0)
-2719.36
import numpy_financial as npf
?npf.rate
Signature: npf.rate(nper, pmt, pv, fv) Compute the rate of interest per period.Parameters nper : 복리 기간 수pmt : 지급액pv : 현가fv : 미래가치
import numpy_financial as npf
12 * npf.rate(nper=30*12, pmt=-1500, pv=0, fv=1000000)
0.0377
Python으로 배우는 채권 가치평가와 분석