Nhiều hàm tài chính hơn

Định giá và Phân tích Trái phiếu bằng Python

Joshua Mayhew

Options Trader

Hàm nper()

  • Cho biết số kỳ cần để tăng PV thành FV
import numpy_financial as npf
?npf.nper
Signature: npf.nper(rate, pmt, pv, fv=0)

Compute the number of periodic payments.

Parameters rate : Rate of interest (per period)
pmt : Payment
pv : Present value
fv : (optional) Future value
Định giá và Phân tích Trái phiếu bằng Python

Hàm nper()

  • Mất bao lâu để tiết kiệm 7.000 USD nếu đầu tư 270 USD/tháng với 5%/năm, lãi gộp theo tháng?
import numpy_financial as npf
npf.nper(rate=0.05/12, pmt=-270, pv=0, fv=7000)
24.67
Định giá và Phân tích Trái phiếu bằng Python

Hàm pmt()

  • Cho biết khoản thanh toán cần để tăng PV thành FV
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.
Định giá và Phân tích Trái phiếu bằng Python

Hàm pmt()

  • Vay 275.000 USD với lãi suất 3,5%/năm, gộp theo tháng
  • Cần trả góp hàng tháng bao nhiêu để tất toán thế chấp trong 10 năm?
import numpy_financial as npf
npf.pmt(rate=0.035/12, nper=10*12, pv=275000, fv=0)
-2719.36
Định giá và Phân tích Trái phiếu bằng Python

Hàm rate()

  • Cho biết lãi suất cần để tăng PV thành FV
import numpy_financial as npf
?npf.rate
Signature: npf.rate(nper, pmt, pv, fv)

Compute the rate of interest per period.

Parameters nper : Number of compounding periods
pmt : Payment
pv : Present value
fv : Future value
Định giá và Phân tích Trái phiếu bằng Python

Hàm rate()

  • Cần suất sinh lời nào để nghỉ hưu sau 30 năm?
  • Bạn tiết kiệm 1.500 USD mỗi tháng và muốn có 1 triệu USD.
  • Giả sử lãi gộp theo tháng.
import numpy_financial as npf
12 * npf.rate(nper=30*12, pmt=-1500, pv=0, fv=1000000)
0.0377
Định giá và Phân tích Trái phiếu bằng Python

Hãy luyện tập!

Định giá và Phân tích Trái phiếu bằng Python

Preparing Video For Download...