當前位置: 首頁>>代碼示例>>Python>>正文


Python numpy.fv方法代碼示例

本文整理匯總了Python中numpy.fv方法的典型用法代碼示例。如果您正苦於以下問題:Python numpy.fv方法的具體用法?Python numpy.fv怎麽用?Python numpy.fv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在numpy的用法示例。


在下文中一共展示了numpy.fv方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_fv

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def test_fv(self):
        assert_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.362673042924) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:4,代碼來源:test_financial.py

示例2: test_fv_decimal

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def test_fv_decimal(self):
        assert_equal(np.fv(Decimal('0.075'), Decimal('20'), Decimal('-2000'), 0, 0),
                     Decimal('86609.36267304300040536731624')) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:5,代碼來源:test_financial.py

示例3: _pmt_dispatcher

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _pmt_dispatcher(rate, nper, pv, fv=None, when=None):
    return (rate, nper, pv, fv) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:4,代碼來源:financial.py

示例4: _nper_dispatcher

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _nper_dispatcher(rate, pmt, pv, fv=None, when=None):
    return (rate, pmt, pv, fv) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:4,代碼來源:financial.py

示例5: _ipmt_dispatcher

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _ipmt_dispatcher(rate, per, nper, pv, fv=None, when=None):
    return (rate, per, nper, pv, fv) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:4,代碼來源:financial.py

示例6: _ppmt_dispatcher

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _ppmt_dispatcher(rate, per, nper, pv, fv=None, when=None):
    return (rate, per, nper, pv, fv) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:4,代碼來源:financial.py

示例7: ppmt

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def ppmt(rate, per, nper, pv, fv=0, when='end'):
    """
    Compute the payment against loan principal.

    Parameters
    ----------
    rate : array_like
        Rate of interest (per period)
    per : array_like, int
        Amount paid against the loan changes.  The `per` is the period of
        interest.
    nper : array_like
        Number of compounding periods
    pv : array_like
        Present value
    fv : array_like, optional
        Future value
    when : {{'begin', 1}, {'end', 0}}, {string, int}
        When payments are due ('begin' (1) or 'end' (0))

    See Also
    --------
    pmt, pv, ipmt

    """
    total = pmt(rate, nper, pv, fv, when)
    return total - ipmt(rate, per, nper, pv, fv, when) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:29,代碼來源:financial.py

示例8: _pv_dispatcher

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _pv_dispatcher(rate, nper, pmt, fv=None, when=None):
    return (rate, nper, nper, pv, fv) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:4,代碼來源:financial.py

示例9: _rate_dispatcher

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _rate_dispatcher(nper, pmt, pv, fv, when=None, guess=None, tol=None,
                     maxiter=None):
    return (nper, pmt, pv, fv)


# Use Newton's iteration until the change is less than 1e-6
#  for all values or a maximum of 100 iterations is reached.
#  Newton's rule is
#  r_{n+1} = r_{n} - g(r_n)/g'(r_n)
#     where
#  g(r) is the formula
#  g'(r) is the derivative with respect to r. 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:14,代碼來源:financial.py

示例10: _rbl

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def _rbl(rate, per, pmt, pv, when):
    """
    This function is here to simply have a different name for the 'fv'
    function to not interfere with the 'fv' keyword argument within the 'ipmt'
    function.  It is the 'remaining balance on loan' which might be useful as
    it's own function, but is easily calculated with the 'fv' function.
    """
    return fv(rate, (per - 1), pmt, pv, when) 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:10,代碼來源:financial.py

示例11: test_fv

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def test_fv(self):
        assert_almost_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.36, 2) 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:4,代碼來源:test_financial.py

示例12: ppmt

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def ppmt(rate, per, nper, pv, fv=0.0, when='end'):
    """
    Compute the payment against loan principal.

    Parameters
    ----------
    rate : array_like
        Rate of interest (per period)
    per : array_like, int
        Amount paid against the loan changes.  The `per` is the period of
        interest.
    nper : array_like
        Number of compounding periods
    pv : array_like
        Present value
    fv : array_like, optional
        Future value
    when : {{'begin', 1}, {'end', 0}}, {string, int}
        When payments are due ('begin' (1) or 'end' (0))

    See Also
    --------
    pmt, pv, ipmt

    """
    total = pmt(rate, nper, pv, fv, when)
    return total - ipmt(rate, per, nper, pv, fv, when) 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:29,代碼來源:financial.py

示例13: test_fv

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import fv [as 別名]
def test_fv(self):
        assert_almost_equal(np.fv(0.075, 20, -2000, 0, 0),
                            86609.36, 2) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:5,代碼來源:test_financial.py


注:本文中的numpy.fv方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。