Macro Library finance2

Financial Functions. Version 1. October 2020

Author: Amir Tavangar

             Humber College, Toronto, ON

To import the library, include loadlibrary("finance2") in the common control.

The functions in this library can be used to compute almost all compound and annuity problems as well as different business investment-decision methods such as

List of functions:

 

fin_FV(IY, Nper, PMT, PY, CY, [PV, type])
 
Function fin_FV computes the future value of a loan or investment based on a constant annual interest rate.

Parameters:

Returns

 The future value of a loan or investment: a positive value for cash inflow and a negative value for cash outflow.

 

fin_PV(IY, Nper, PMT, PY, CY, [FV, type])
 
Function fin_PV computes the present value (principal) of a loan or investment based on a constant annual interest rate.

Parameters:

Returns

The present value of a loan or investment: a positive value for cash inflow and a negative value for cash outflow.

 

fin_PMT(IY, Nper, PV, PY, CY, [FV, type])
 
Function fin_PMT computes the periodic payment of a loan or investment based on a constant annual interest rate.

Parameters:

Returns

The periodic payment of a loan or investment: a positive value for cash inflow and a negative value for cash outflow.

 

fin_Nper(IY, PMT, PV, PY, CY, [FV,type])

Function fin_Nper computes the total number of payments/compounding periods in the term of an investment or loan based on a constant annual interest rate.

Parameters:

Returns

The number of payments/compounding periods in the loan or investment term.

 

fin_IY(Nper, PMT, PV, PY, CY, [FV, type])

Function fin_IY computes the nominal interest rate per year in percent. 

Parameters:

Returns

The nominal interest rate per year in percent (%). 

 

fin_iPMT(per ,IY ,Nper ,PV ,PY ,CY , [FV, type])

Function fin_iPMT computes the interest portion of a payment or a period (a range of payments). Functions iPMT and pPMT can be used to generate an amortization schedule. 

Parameters:

Returns

The interest portion of a payment or a period (a range of payments).
 
 

fin_pPMT(per ,IY ,Nper ,PV ,PY ,CY , [FV, type])

Function fin_pPMT computes the principal portion of a payment or a period (a range of payments). Functions pPMT and iPMT can be used to generate an amortization schedule. 

Parameters:

Returns

The principal portion of a payment or a period (a range of payments).

 

fin_IRR(CF, FR)

Function fin_IRR computes the Internal Rate of Return (IRR), in percent, of a series of cash flows. IRR is the average periodically compounded rate of return that gives a net present value (NPV) of 0. In other words, IRR is the lowest rate of return from an investment that is acceptable to justify the investment.

Parameters:

Both CF and FR arrays must be the same size. For example, if the initial investment is $50,000 (cash ouflow), and the annual returns on investment (cash inflow) are expected to be $10,000 in the first year and $20,000 in the next three subsequent years, CF = array(-50,000, 10000, 20000) and FR = array(1, 1, 3).

Returns

The Internal Rate of Return (IRR) in percent (%).

 

fin_NPV(CF, FR, IY)

Function fin_NPV computes the Net Present Value (NPV) of a series of cash flows. NPV is a method of evaluating the feasibility of investments by finding the difference of present values of all cash flows. Investment is accepted when NPV>=0 and rejected when NPV<0.

Parameters:

Both CF and FR arrays must be the same size. For example, if the initial investment is $50,000 (cash ouflow), and the annual returns on investment (cash inflow) are expected to be $10,000 in the first year and $20,000 in the next three subsequent years, CF = array(-50,000, 10000, 20000) and FR = array(1, 1, 3).

 Returns:

 The Net Present Value (NPV) of a series of cash flows ($). 

 

fin_DBD(Date1,Date2)

Function fin_DBD computes the number of days between the given dates (DBD). DBD function can be used for time-value-of-money problems (generally short-terms) where the term of the investment or loan is not given explicitly but rather in a form of two dates.

Parameters:

Returns:

The number of days between the given dates (DBD).

 

fin_TVM()

Function fin_TVM returns an iframe for displaying a Time-Value-of-Money (TVM) solver. It provides students with a solver that can be used to compute different values of loans or investments (works similar to the functions in this library).

Parameters: None

Returns:

An embedded iframe code for inserting the solver into a question.

Back to top of page