Python numpy.fv() Examples
The following are 30 code examples for showing how to use numpy.fv(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.
You may check out the related API usage on the sidebar.
You may also want to check out all available functions/classes of the module
numpy
, or try the search function
.
Example 1
Project: recruit Author: Frank-qlu File: test_financial.py License: Apache License 2.0 | 5 votes |
def test_fv(self): assert_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.362673042924)
Example 2
Project: recruit Author: Frank-qlu File: test_financial.py License: Apache License 2.0 | 5 votes |
def test_fv_decimal(self): assert_equal(np.fv(Decimal('0.075'), Decimal('20'), Decimal('-2000'), 0, 0), Decimal('86609.36267304300040536731624'))
Example 3
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
def _pmt_dispatcher(rate, nper, pv, fv=None, when=None): return (rate, nper, pv, fv)
Example 4
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
def _nper_dispatcher(rate, pmt, pv, fv=None, when=None): return (rate, pmt, pv, fv)
Example 5
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
def _ipmt_dispatcher(rate, per, nper, pv, fv=None, when=None): return (rate, per, nper, pv, fv)
Example 6
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
def _ppmt_dispatcher(rate, per, nper, pv, fv=None, when=None): return (rate, per, nper, pv, fv)
Example 7
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
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)
Example 8
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
def _pv_dispatcher(rate, nper, pmt, fv=None, when=None): return (rate, nper, nper, pv, fv)
Example 9
Project: recruit Author: Frank-qlu File: financial.py License: Apache License 2.0 | 5 votes |
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.
Example 10
Project: lambda-packs Author: ryfeus File: financial.py License: MIT License | 5 votes |
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)
Example 11
Project: lambda-packs Author: ryfeus File: financial.py License: MIT License | 5 votes |
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)
Example 12
Project: lambda-packs Author: ryfeus File: test_financial.py License: MIT License | 5 votes |
def test_fv(self): assert_almost_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.36, 2)
Example 13
Project: lambda-packs Author: ryfeus File: financial.py License: MIT License | 5 votes |
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)
Example 14
Project: lambda-packs Author: ryfeus File: financial.py License: MIT License | 5 votes |
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)
Example 15
Project: auto-alt-text-lambda-api Author: abhisuri97 File: test_financial.py License: MIT License | 5 votes |
def test_fv(self): assert_almost_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.36, 2)
Example 16
Project: auto-alt-text-lambda-api Author: abhisuri97 File: financial.py License: MIT License | 5 votes |
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)
Example 17
Project: auto-alt-text-lambda-api Author: abhisuri97 File: financial.py License: MIT License | 5 votes |
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)
Example 18
Project: vnpy_crypto Author: birforce File: test_financial.py License: MIT License | 5 votes |
def test_fv(self): assert_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.362673042924)
Example 19
Project: vnpy_crypto Author: birforce File: test_financial.py License: MIT License | 5 votes |
def test_fv_decimal(self): assert_equal(np.fv(Decimal('0.075'), Decimal('20'), Decimal('-2000'), 0, 0), Decimal('86609.36267304300040536731624'))
Example 20
Project: vnpy_crypto Author: birforce File: financial.py License: MIT License | 5 votes |
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)
Example 21
Project: vnpy_crypto Author: birforce File: financial.py License: MIT License | 5 votes |
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)
Example 22
Project: Computable Author: ktraunmueller File: test_financial.py License: MIT License | 5 votes |
def test_fv(self): assert_almost_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.36, 2)
Example 23
Project: Computable Author: ktraunmueller File: financial.py License: MIT License | 5 votes |
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)
Example 24
Project: Computable Author: ktraunmueller File: financial.py License: MIT License | 5 votes |
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)
Example 25
Project: Mastering-Elasticsearch-7.0 Author: PacktPublishing File: test_financial.py License: MIT License | 5 votes |
def test_fv(self): assert_equal(np.fv(0.075, 20, -2000, 0, 0), 86609.362673042924)
Example 26
Project: Mastering-Elasticsearch-7.0 Author: PacktPublishing File: test_financial.py License: MIT License | 5 votes |
def test_fv_decimal(self): assert_equal(np.fv(Decimal('0.075'), Decimal('20'), Decimal('-2000'), 0, 0), Decimal('86609.36267304300040536731624'))
Example 27
Project: Mastering-Elasticsearch-7.0 Author: PacktPublishing File: financial.py License: MIT License | 5 votes |
def _pmt_dispatcher(rate, nper, pv, fv=None, when=None): return (rate, nper, pv, fv)
Example 28
Project: Mastering-Elasticsearch-7.0 Author: PacktPublishing File: financial.py License: MIT License | 5 votes |
def _nper_dispatcher(rate, pmt, pv, fv=None, when=None): return (rate, pmt, pv, fv)
Example 29
Project: Mastering-Elasticsearch-7.0 Author: PacktPublishing File: financial.py License: MIT License | 5 votes |
def _ipmt_dispatcher(rate, per, nper, pv, fv=None, when=None): return (rate, per, nper, pv, fv)
Example 30
Project: Mastering-Elasticsearch-7.0 Author: PacktPublishing File: financial.py License: MIT License | 5 votes |
def _ppmt_dispatcher(rate, per, nper, pv, fv=None, when=None): return (rate, per, nper, pv, fv)