|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.core.script.Finance
public class Finance
Defines a set of static methods that support a number of widely-used financial functions.
Method Summary | |
---|---|
static double |
ddb(double cost,
double salvage,
double life,
int period)
|
static double |
fv(double rate,
int nPer,
double pmt,
double pv,
int due)
|
static double |
ipmt(double rate,
int per,
int nPer,
double pv,
double fv,
int due)
|
static double |
irr(double[] cash,
double intrate)
|
static double |
mirr(double[] arptr,
double frate,
double rrate)
|
static double |
nper(double rate,
double pmt,
double pv,
double fv,
int due)
* |
static double |
nPer(double rate,
double pmt,
double pv,
double fv,
int due)
Deprecated. use nper instead |
static double |
npv(double rate,
double[] arptr)
|
static double |
percent(double denom,
double num,
double valueIfZero)
|
static double |
pmt(double rate,
int nper,
double pv,
double fv,
int due)
|
static double |
ppmt(double rate,
int per,
int nPer,
double pv,
double fv,
int due)
|
static double |
pv(double rate,
int nPer,
double pmt,
double fv,
int due)
|
static double |
rate(int nPer,
double pmt,
double pv,
double fv,
int due,
double guess)
|
static double |
sln(double cost,
double salvage,
double life)
|
static double |
syd(double cost,
double salvage,
double life,
int period)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double ddb(double cost, double salvage, double life, int period) throws java.lang.IllegalArgumentException
Cost
- the initial cost of the asset.salvage
- the value at the end of the depreciation (sometimes called the
salvage value of the asset).life
- the number of periods over which the asset is being
depreciated (sometimes called the useful life of the asset).period
- the period for which you want to calculate the depreciation.
Period must use the same units as life.
java.lang.IllegalArgumentException
public static double sln(double cost, double salvage, double life) throws java.lang.IllegalArgumentException
cost
- the initial cost of the asset.salvage
- the value at the end of the depreciation (sometimes called the
salvage value of the asset).life
- the number of periods over which the asset is depreciated
(sometimes called the useful life of the asset).
java.lang.IllegalArgumentException
public static double syd(double cost, double salvage, double life, int period) throws java.lang.IllegalArgumentException
cost
- the initial cost of the asset.salvage
- the value at the end of the depreciation (sometimes called the
salvage value of the asset).life
- the number of periods over which the asset is depreciated
(sometimes called the useful life of the asset).period
- the period and must use the same units as life.
java.lang.IllegalArgumentException
public static double fv(double rate, int nPer, double pmt, double pv, int due) throws java.lang.IllegalArgumentException
rate
- the interest rate per period.nPer
- the total number of payment periods in an annuity.pmt
- the payment made each period; it cannot change over the life
of the annuity. Typically, pmt contains principal and interest
but no other fees or taxes. If pmt is omitted, you must
include the pv argument.pv
- the present value, or the lump-sum amount that a series of
future payments is worth right now. If pv is omitted, it is
assumed to be 0 (zero), and you must include the pmt argument.due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.
java.lang.IllegalArgumentException
public static double pmt(double rate, int nper, double pv, double fv, int due) throws java.lang.IllegalArgumentException
rate
- the interest rate per period.nPer
- the total number of payment periods in an annuity.pv
- the present value, or the lump-sum amount that a series of
future payments is worth right now. If pv is omitted, it is
assumed to be 0 (zero), and you must include the pmt argument.due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.
java.lang.IllegalArgumentException
public static double ipmt(double rate, int per, int nPer, double pv, double fv, int due) throws java.lang.IllegalArgumentException
rate
- the interest rate per period.nPer
- the total number of payment periods in an annuity.pv
- the present value, or the lump-sum amount that a series of
future payments is worth right now. If pv is omitted, it is
assumed to be 0 (zero), and you must include the pmt argument.due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.per
- the period for which you want to find the interest and must be
in the range 1 to nper.fv
- the future value, or a cash balance you want to attain after
the last payment is made. If fv is omitted, it is assumed to
be 0 (the future value of a loan, for example, is 0).
java.lang.IllegalArgumentException
public static double ppmt(double rate, int per, int nPer, double pv, double fv, int due) throws java.lang.IllegalArgumentException
rate
- the interest rate per period.nPer
- the total number of payment periods in an annuity.pv
- the present value, or the lump-sum amount that a series of
future payments is worth right now. If pv is omitted, it is
assumed to be 0 (zero), and you must include the pmt argument.due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.per
- the period for which you want to find the interest and must be
in the range 1 to nper.fv
- the future value, or a cash balance you want to attain after
the last payment is made. If fv is omitted, it is assumed to
be 0 (the future value of a loan, for example, is 0).
java.lang.IllegalArgumentException
public static double nper(double rate, double pmt, double pv, double fv, int due) throws java.lang.IllegalArgumentException
rate
- the interest rate per period.pv
- the present value, or the lump-sum amount that a series of
future payments is worth right now. If pv is omitted, it is
assumed to be 0 (zero), and you must include the pmt argument.due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.fv
- the future value, or a cash balance you want to attain after
the last payment is made. If fv is omitted, it is assumed to
be 0 (the future value of a loan, for example, is 0).pmt
- the payment made each period; it cannot change over the life
of the annuity. Typically, pmt contains principal and interest
but no other fees or taxes.
java.lang.IllegalArgumentException
public static double nPer(double rate, double pmt, double pv, double fv, int due) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static double pv(double rate, int nPer, double pmt, double fv, int due) throws java.lang.IllegalArgumentException
rate
- the interest rate per period.due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.fv
- the future value, or a cash balance you want to attain after
the last payment is made. If fv is omitted, it is assumed to
be 0 (the future value of a loan, for example, is 0).pmt
- the payment made each period; it cannot change over the life
of the annuity. Typically, pmt contains principal and interest
but no other fees or taxes.nPer
- the total number of payment periods in an annuity. For
example, if you get a four-year car loan and make monthly
payments, your loan has 4*12 (or 48) periods. You would enter
48 into the formula for nper.
java.lang.IllegalArgumentException
public static double rate(int nPer, double pmt, double pv, double fv, int due, double guess) throws java.lang.IllegalArgumentException
due
- the number 0 or 1 and indicates when payments are due. If type
is omitted, it is assumed to be 0.fv
- the future value, or a cash balance you want to attain after
the last payment is made. If fv is omitted, it is assumed to
be 0 (the future value of a loan, for example, is 0).pmt
- the payment made each period; it cannot change over the life
of the annuity. Typically, pmt contains principal and interest
but no other fees or taxes.nPer
- the total number of payment periods in an annuity. For
example, if you get a four-year car loan and make monthly
payments, your loan has 4*12 (or 48) periods. You would enter
48 into the formula for nper.pv
- the present value of the total amount that a series of future
payments is worth now.guess
- is your guess for what the rate will be. If you omit guess, it
is assumed to be 10 percent. If RATE does not converge, try
different values for guess. RATE usually converges if guess is
between 0 and 1.
java.lang.IllegalArgumentException
public static double percent(double denom, double num, double valueIfZero)
denom
- the denominatornum
- the numeratorvalueIfZero
- The percent value to return if the numerator is zero. The default is null.
public static double npv(double rate, double[] arptr) throws java.lang.IllegalArgumentException
arptr
- array of Doubles that specifies the name of an existing array
of cash flow values. Rule for rate
- the rate of discount over the length of one period.
java.lang.IllegalArgumentException
public static double irr(double[] cash, double intrate) throws java.lang.IllegalArgumentException
cash
- specifies the name of an existing array of Doubles
representing cash flow valuesintrate
- is a number that you guess is close to the result of IRR.
java.lang.IllegalArgumentException
public static double mirr(double[] arptr, double frate, double rrate) throws java.lang.IllegalArgumentException
arptr
- array of Doubles that specifies the name of an existing array
of cash flow valuesfrate
- the interest rate you pay on the money used in the cash flows.rrate
- the interest rate you receive on the cash flows as you
reinvest them.
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |