public final class FinanceLib extends Object
p(1+r)^n + y(1+rt)((1+r)^n-1)/r + f=0 ...{when r!=0} ny + p + f=0 ...{when r=0}
Modifier and Type | Method and Description |
---|---|
static double |
fv(double r,
double n,
double y,
double p,
boolean t)
Future value of an amount given the number of payments, rate, amount
of individual payment, present value and boolean value indicating whether
payments are due at the beginning of period
(false => payments are due at end of period)
|
static double |
nper(double r,
double y,
double p,
double f,
boolean t) |
static double |
npv(double r,
double[] cfs)
calculates the Net Present Value of a principal amount
given the discount rate and a sequence of cash flows
(supplied as an array).
|
static double |
pmt(double r,
double n,
double p,
double f,
boolean t) |
static double |
pv(double r,
double n,
double y,
double f,
boolean t)
Present value of an amount given the number of future payments, rate, amount
of individual payment, future value and boolean value indicating whether
payments are due at the beginning of period
(false => payments are due at end of period)
|
public static double fv(double r, double n, double y, double p, boolean t)
r
- raten
- num of periodsy
- pmt per periodp
- future valuet
- type (true=pmt at end of period, false=pmt at begining of period)public static double pv(double r, double n, double y, double f, boolean t)
r
- n
- y
- f
- t
- public static double npv(double r, double[] cfs)
r
- cfs
- cashflow amountspublic static double pmt(double r, double n, double p, double f, boolean t)
r
- n
- p
- f
- t
- public static double nper(double r, double y, double p, double f, boolean t)
r
- y
- p
- f
- t
- Copyright © 2020. All rights reserved.