Title: | Capital Budgeting Analysis, Annuity Loan Calculations and Amortization Schedules |
---|---|
Description: | Provides Capital Budgeting Analysis functionality and the essential Annuity loan functions. Also computes Loan Amortization Schedules including schedules with irregular payments. |
Authors: | John T. Buynak |
Maintainer: | John T. Buynak <[email protected]> |
License: | GPL-3 |
Version: | 1.3.0 |
Built: | 2024-12-09 06:46:25 UTC |
Source: | CRAN |
Calculates the payment, present value, future value, rate, or the number of periods
annuity(type = c("pv", "fv", "pmt", "nper", "rate"), pv, fv = 0, pmt, n, r, end = TRUE)
annuity(type = c("pv", "fv", "pmt", "nper", "rate"), pv, fv = 0, pmt, n, r, end = TRUE)
type |
Loan parameter to return. ("pv", "fv", "pmt", "nper", "rate") |
pv |
Present Value |
fv |
Future Value |
pmt |
Periodic Payment |
n |
Number of Periods |
r |
Rate |
end |
Logical, set to TRUE. If FALSE, payments are made at the beginning the period. |
Returns the selected Annuity Loan Parameter
annuity(type = "pmt", pv = -2000, fv = 0, n = 4 * 12, r = 0.06/12, end = TRUE)
annuity(type = "pmt", pv = -2000, fv = 0, n = 4 * 12, r = 0.06/12, end = TRUE)
Effective Annual Rate
ear(apr, n, p = 5)
ear(apr, n, p = 5)
apr |
Annual Rate (Nominal Interest Rate) |
n |
Number of compounds in a year |
p |
Calculates the EAR to the (1/10^p) decimal place |
Effective Annual Rate
ear(apr= 0.05, n = 12)
ear(apr= 0.05, n = 12)
Calculates the Future Value given a Present Value
fv(pv, r, n)
fv(pv, r, n)
pv |
Present Value |
r |
Discount Rate |
n |
Number of Compounding Periods |
Returns the Future Value
fv(5000, 0.08/12, 5*12)
fv(5000, 0.08/12, 5*12)
Geometric Mean Return
geometric(c)
geometric(c)
c |
Periodic returns in decimal form |
Returns the Geometric Mean Return
geometric(c(0.05, 0.02, -0.03, 0.09, -0.02))
geometric(c(0.05, 0.02, -0.03, 0.09, -0.02))
Calculates the interest portion of the payment in period "x"
ipmt(pv, fv = 0, n, r, x, end = TRUE)
ipmt(pv, fv = 0, n, r, x, end = TRUE)
pv |
Present Value |
fv |
Future Value |
n |
Number of Periods |
r |
Rate |
x |
Period in which to calculate the interest portion of the payment |
end |
If FALSE, payments are made at the beginning of the period |
Returns the Interest Portion of the Payment in Period "x"
ipmt(pv = 20000, fv = 0, n = 5 * 12, r = 0.05/12, x = 12, end = TRUE)
ipmt(pv = 20000, fv = 0, n = 5 * 12, r = 0.05/12, x = 12, end = TRUE)
Creates an amortization schedule of a loan with irregular payments and withdrawals
irregular(payments, dates, apr, pv, info = TRUE)
irregular(payments, dates, apr, pv, info = TRUE)
payments |
Vector of payments, the first payment must be 0 |
dates |
Vector of dates, the first date is the date of origination |
apr |
Annual rate |
pv |
Present Value |
info |
Logical, if set to 'TRUE' information about the dataframe arrangement will be printed |
Returns the irregular Amortization Schedule in a Dataframe
irregular(payments = c(0, 200, -100), dates = c("2019-01-01", "2019-02-08", "2019-03-20"), apr = 0.05, pv = 2000, info = FALSE)
irregular(payments = c(0, 200, -100), dates = c("2019-01-01", "2019-02-08", "2019-03-20"), apr = 0.05, pv = 2000, info = FALSE)
Calculates the principal of the payment in period "x"
ppmt(pv, fv = 0, n, r, x, end = TRUE)
ppmt(pv, fv = 0, n, r, x, end = TRUE)
pv |
Present Value |
fv |
Future Value |
n |
Number of Periods |
r |
Rate |
x |
Period in which to calculate the principal portion of the payment |
end |
If FALSE, payments are made at the beginning of the period |
Returns the Principal Portion of the Payment in Period "x"
ppmt(pv = 5000, fv = 0, n = 4 * 12, r = 0.06/12, x = 12, end = TRUE)
ppmt(pv = 5000, fv = 0, n = 4 * 12, r = 0.06/12, x = 12, end = TRUE)
Calculates the present value of a given future value
pv(fv, r, n)
pv(fv, r, n)
fv |
Future Value |
r |
Discount Rate |
n |
Number of Compounding Periods |
Returns the Present Value
pv(5000, 0.08/12, 5*12)
pv(5000, 0.08/12, 5*12)
Return Calculation
r.calc(vector)
r.calc(vector)
vector |
Vector from which to calculate the periodic return |
Returns the Periodic Percent Return
r.calc(c(100, 75, 50, 80, 125))
r.calc(c(100, 75, 50, 80, 125))
Creates an amortization schedule of a loan
schedule(r, n, pv, fv = 0, end = TRUE)
schedule(r, n, pv, fv = 0, end = TRUE)
r |
Rate |
n |
Number of Periods |
pv |
Present Value |
fv |
Future Value, set = 0 |
end |
If FALSE, payments are made at the beginning of the period |
Returns the Amortization Schedule in a dataframe
schedule(r = 0.06/12, n = 10 * 12, pv = -5000, fv = 0, end = TRUE)
schedule(r = 0.06/12, n = 10 * 12, pv = -5000, fv = 0, end = TRUE)