CapitalR"

Functions

Annuity Loan Calculation

Calculates the payment, present value, future value, rate, or the number of periods

$annuity(type = "pmt", pv = -2000, fv = 0, n = 4 * 12, r = 0.06/12, end = TRUE)$

Interest Payment

Calculates the interest portion of the periodic payment at period "x"

$ipmt(pv = 20000, fv = 0, n = 5 * 12, r = 0.05/12, x = 12, end = TRUE)$

Principal Payment

Calculates the principal portion of the periodic payment at period "x"

$ppmt(pv = 20000, fv = 0, n = 5 * 12, r = 0.05/12, x = 12, end = TRUE)$

Amortization Schedule

Returns the loan amortization schedule

$schedule(r = 0.06/12, n = 10 * 12, pv = -5000, fv = 0, end = TRUE)$

Amortization Schedule with Irregular Payments

Returns the loan amortization schedule with irregular payments

$irregular(payments = c(0, 200, -100, 500), dates = c("2019-01-01", "2019-02-08", "2019-03-20", "2019-05-05"), apr = 0.05, pv = 2000, info = TRUE)$

Present Value

$pv(fv = 20000, n = 5 * 12, r = 0.08 / 12)$

Future Value

$fv(pv = 20000, n = 5 * 12, r = 0.08 / 12)$

Geometric Mean Return

Computes the geometric mean return of a vector of periodic returns in decimal form

$geometric(c(0.20, 0.05, -0.50, 0.75, 0.25))$

Return Calculation

Calculates the periodic return, supply a vector of numerical asset prices

$r.calc(c(80, 65, 70, 75, 90, 105))$



Try the capitalR package in your browser

Any scripts or data that you put into this service are public.

capitalR documentation built on Dec. 1, 2019, 1:23 a.m.