class Financial (View source)

Constants

FINANCIAL_MAX_ITERATIONS

FINANCIAL_PRECISION

Methods

static float|string
ACCRINT(mixed $issue, mixed $firstinterest, mixed $settlement, float $rate, float $par = 1000, int $frequency = 1, int $basis = 0)

ACCRINT.

static float|string
ACCRINTM(mixed $issue, mixed $settlement, float $rate, float $par = 1000, int $basis = 0)

ACCRINTM.

static float
AMORDEGRC(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, int $basis = 0)

AMORDEGRC.

static float
AMORLINC(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, int $basis = 0)

AMORLINC.

static float|string
COUPDAYBS(mixed $settlement, mixed $maturity, int $frequency, int $basis = 0)

COUPDAYBS.

static float|string
COUPDAYS(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPDAYS.

static float|string
COUPDAYSNC(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPDAYSNC.

static mixed
COUPNCD(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPNCD.

static int|string
COUPNUM(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPNUM.

static mixed
COUPPCD(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPPCD.

static float|string
CUMIPMT(float $rate, int $nper, float $pv, int $start, int $end, int $type = 0)

CUMIPMT.

static float|string
CUMPRINC(float $rate, int $nper, float $pv, int $start, int $end, int $type = 0)

CUMPRINC.

static float|string
DB(float $cost, float $salvage, int $life, int $period, int $month = 12)

DB.

static float|string
DDB(float $cost, float $salvage, int $life, int $period, float $factor = 2.0)

DDB.

static float|string
DISC(mixed $settlement, mixed $maturity, int $price, int $redemption, int $basis = 0)

DISC.

static float|string
DOLLARDE(float $fractional_dollar = null, int $fraction = 0)

DOLLARDE.

static float|string
DOLLARFR(float $decimal_dollar = null, int $fraction = 0)

DOLLARFR.

static float|string
EFFECT(float $nominal_rate = 0, int $npery = 0)

EFFECT.

static float|string
FV(float $rate = 0, int $nper = 0, float $pmt = 0, float $pv = 0, int $type = 0)

FV.

static float
FVSCHEDULE(float $principal, float[] $schedule)

FVSCHEDULE.

static float|string
INTRATE(mixed $settlement, mixed $maturity, int $investment, int $redemption, int $basis = 0)

INTRATE.

static float|string
IPMT(float $rate, int $per, int $nper, float $pv, float $fv = 0, int $type = 0)

IPMT.

static float|string
IRR(float[] $values, float $guess = 0.1)

IRR.

static 
ISPMT(...$args)

ISPMT.

static float|string
MIRR(float[] $values, float $finance_rate, float $reinvestment_rate)

MIRR.

static float|string
NOMINAL(float $effect_rate = 0, int $npery = 0)

NOMINAL.

static float|string
NPER(float $rate = 0, int $pmt = 0, float $pv = 0, float $fv = 0, int $type = 0)

NPER.

static float
NPV(...$args)

NPV.

static float|string
PDURATION(float $rate = 0, float $pv = 0, float $fv = 0)

PDURATION.

static float
PMT(float $rate = 0, int $nper = 0, float $pv = 0, float $fv = 0, int $type = 0)

PMT.

static float
PPMT(float $rate, int $per, int $nper, float $pv, float $fv = 0, int $type = 0)

PPMT.

static 
PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0)

No description

static float
PRICEDISC(mixed $settlement, mixed $maturity, int $discount, int $redemption, int $basis = 0)

PRICEDISC.

static float
PRICEMAT(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $yield, int $basis = 0)

PRICEMAT.

static float
PV(float $rate = 0, int $nper = 0, float $pmt = 0, float $fv = 0, int $type = 0)

PV.

static float
RATE(float $nper, float $pmt, float $pv, float $fv = 0.0, int $type = 0, float $guess = 0.1)

RATE.

static float
RECEIVED(mixed $settlement, mixed $maturity, int $investment, int $discount, int $basis = 0)

RECEIVED.

static float|string
RRI(float $nper = 0, float $pv = 0, float $fv = 0)

RRI.

static float|string
SLN(mixed $cost, mixed $salvage, mixed $life)

SLN.

static float|string
SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period)

SYD.

static float
TBILLEQ(mixed $settlement, mixed $maturity, int $discount)

TBILLEQ.

static float
TBILLPRICE(mixed $settlement, mixed $maturity, int $discount)

TBILLPRICE.

static float
TBILLYIELD(mixed $settlement, mixed $maturity, int $price)

TBILLYIELD.

static 
XIRR($values, $dates, $guess = 0.1)

No description

static float
XNPV(float $rate, array $values, array $dates)

XNPV.

static float
YIELDDISC(mixed $settlement, mixed $maturity, int $price, int $redemption, int $basis = 0)

YIELDDISC.

static float
YIELDMAT(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $price, int $basis = 0)

YIELDMAT.

Details

static float|string ACCRINT(mixed $issue, mixed $firstinterest, mixed $settlement, float $rate, float $par = 1000, int $frequency = 1, int $basis = 0)

ACCRINT.

Returns the accrued interest for a security that pays periodic interest.

Excel Function: ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis])

Parameters

mixed $issue the security's issue date
mixed $firstinterest the security's first interest date
mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
float $rate the security's annual coupon rate
float $par The security's par value. If you omit par, ACCRINT uses $1,000.
int $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static float|string ACCRINTM(mixed $issue, mixed $settlement, float $rate, float $par = 1000, int $basis = 0)

ACCRINTM.

Returns the accrued interest for a security that pays interest at maturity.

Excel Function: ACCRINTM(issue,settlement,rate[,par[,basis]])

Parameters

mixed $issue The security's issue date
mixed $settlement The security's settlement (or maturity) date
float $rate The security's annual coupon rate
float $par The security's par value. If you omit par, ACCRINT uses $1,000.
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static float AMORDEGRC(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, int $basis = 0)

AMORDEGRC.

Returns the depreciation for each accounting period. This function is provided for the French accounting system. If an asset is purchased in the middle of the accounting period, the prorated depreciation is taken into account. The function is similar to AMORLINC, except that a depreciation coefficient is applied in the calculation depending on the life of the assets. This function will return the depreciation until the last period of the life of the assets or until the cumulated value of depreciation is greater than the cost of the assets minus the salvage value.

Excel Function: AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis])

Parameters

float $cost The cost of the asset
mixed $purchased Date of the purchase of the asset
mixed $firstPeriod Date of the end of the first period
mixed $salvage The salvage value at the end of the life of the asset
float $period The period
float $rate Rate of depreciation
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float

static float AMORLINC(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, int $basis = 0)

AMORLINC.

Returns the depreciation for each accounting period. This function is provided for the French accounting system. If an asset is purchased in the middle of the accounting period, the prorated depreciation is taken into account.

Excel Function: AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])

Parameters

float $cost The cost of the asset
mixed $purchased Date of the purchase of the asset
mixed $firstPeriod Date of the end of the first period
mixed $salvage The salvage value at the end of the life of the asset
float $period The period
float $rate Rate of depreciation
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float

static float|string COUPDAYBS(mixed $settlement, mixed $maturity, int $frequency, int $basis = 0)

COUPDAYBS.

Returns the number of days from the beginning of the coupon period to the settlement date.

Excel Function: COUPDAYBS(settlement,maturity,frequency[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
int $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static float|string COUPDAYS(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPDAYS.

Returns the number of days in the coupon period that contains the settlement date.

Excel Function: COUPDAYS(settlement,maturity,frequency[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static float|string COUPDAYSNC(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPDAYSNC.

Returns the number of days from the settlement date to the next coupon date.

Excel Function: COUPDAYSNC(settlement,maturity,frequency[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static mixed COUPNCD(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPNCD.

Returns the next coupon date after the settlement date.

Excel Function: COUPNCD(settlement,maturity,frequency[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, depending on the value of the ReturnDateType flag

static int|string COUPNUM(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPNUM.

Returns the number of coupons payable between the settlement date and maturity date, rounded up to the nearest whole coupon.

Excel Function: COUPNUM(settlement,maturity,frequency[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

int|string

static mixed COUPPCD(mixed $settlement, mixed $maturity, mixed $frequency, int $basis = 0)

COUPPCD.

Returns the previous coupon date before the settlement date.

Excel Function: COUPPCD(settlement,maturity,frequency[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $frequency the number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly If working in Gnumeric Mode, the following frequency options are also available 6 Bimonthly 12 Monthly
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, depending on the value of the ReturnDateType flag

static float|string CUMIPMT(float $rate, int $nper, float $pv, int $start, int $end, int $type = 0)

CUMIPMT.

Returns the cumulative interest paid on a loan between the start and end periods.

Excel Function: CUMIPMT(rate,nper,pv,start,end[,type])

Parameters

float $rate The Interest rate
int $nper The total number of payment periods
float $pv Present Value
int $start The first period in the calculation. Payment periods are numbered beginning with 1.
int $end the last period in the calculation
int $type A number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.

Return Value

float|string

static float|string CUMPRINC(float $rate, int $nper, float $pv, int $start, int $end, int $type = 0)

CUMPRINC.

Returns the cumulative principal paid on a loan between the start and end periods.

Excel Function: CUMPRINC(rate,nper,pv,start,end[,type])

Parameters

float $rate The Interest rate
int $nper The total number of payment periods
float $pv Present Value
int $start The first period in the calculation. Payment periods are numbered beginning with 1.
int $end the last period in the calculation
int $type A number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.

Return Value

float|string

static float|string DB(float $cost, float $salvage, int $life, int $period, int $month = 12)

DB.

Returns the depreciation of an asset for a specified period using the fixed-declining balance method. This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation (as opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the depreciation already deducted from the initial cost.

Excel Function: DB(cost,salvage,life,period[,month])

Parameters

float $cost Initial cost of the asset
float $salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
int $life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
int $period The period for which you want to calculate the depreciation. Period must use the same units as life.
int $month Number of months in the first year. If month is omitted, it defaults to 12.

Return Value

float|string

static float|string DDB(float $cost, float $salvage, int $life, int $period, float $factor = 2.0)

DDB.

Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.

Excel Function: DDB(cost,salvage,life,period[,factor])

Parameters

float $cost Initial cost of the asset
float $salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
int $life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
int $period The period for which you want to calculate the depreciation. Period must use the same units as life.
float $factor The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).

Return Value

float|string

static float|string DISC(mixed $settlement, mixed $maturity, int $price, int $redemption, int $basis = 0)

DISC.

Returns the discount rate for a security.

Excel Function: DISC(settlement,maturity,price,redemption[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
int $price The security's price per $100 face value
int $redemption The security's redemption value per $100 face value
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static float|string DOLLARDE(float $fractional_dollar = null, int $fraction = 0)

DOLLARDE.

Converts a dollar price expressed as an integer part and a fraction part into a dollar price expressed as a decimal number. Fractional dollar numbers are sometimes used for security prices.

Excel Function: DOLLARDE(fractional_dollar,fraction)

Parameters

float $fractional_dollar Fractional Dollar
int $fraction Fraction

Return Value

float|string

static float|string DOLLARFR(float $decimal_dollar = null, int $fraction = 0)

DOLLARFR.

Converts a dollar price expressed as a decimal number into a dollar price expressed as a fraction. Fractional dollar numbers are sometimes used for security prices.

Excel Function: DOLLARFR(decimal_dollar,fraction)

Parameters

float $decimal_dollar Decimal Dollar
int $fraction Fraction

Return Value

float|string

static float|string EFFECT(float $nominal_rate = 0, int $npery = 0)

EFFECT.

Returns the effective interest rate given the nominal rate and the number of compounding payments per year.

Excel Function: EFFECT(nominal_rate,npery)

Parameters

float $nominal_rate Nominal interest rate
int $npery Number of compounding payments per year

Return Value

float|string

static float|string FV(float $rate = 0, int $nper = 0, float $pmt = 0, float $pv = 0, int $type = 0)

FV.

Returns the Future Value of a cash flow with constant payments and interest rate (annuities).

Excel Function: FV(rate,nper,pmt[,pv[,type]])

Parameters

float $rate The interest rate per period
int $nper Total number of payment periods in an annuity
float $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.
float $pv present Value, or the lump-sum amount that a series of future payments is worth right now
int $type A number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.

Return Value

float|string

static float FVSCHEDULE(float $principal, float[] $schedule)

FVSCHEDULE.

Returns the future value of an initial principal after applying a series of compound interest rates. Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate.

Excel Function: FVSCHEDULE(principal,schedule)

Parameters

float $principal the present value
float[] $schedule an array of interest rates to apply

Return Value

float

static float|string INTRATE(mixed $settlement, mixed $maturity, int $investment, int $redemption, int $basis = 0)

INTRATE.

Returns the interest rate for a fully invested security.

Excel Function: INTRATE(settlement,maturity,investment,redemption[,basis])

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
int $investment the amount invested in the security
int $redemption the amount to be received at maturity
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float|string

static float|string IPMT(float $rate, int $per, int $nper, float $pv, float $fv = 0, int $type = 0)

IPMT.

Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.

Excel Function: IPMT(rate,per,nper,pv[,fv][,type])

Parameters

float $rate Interest rate per period
int $per Period for which we want to find the interest
int $nper Number of periods
float $pv Present Value
float $fv Future Value
int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period

Return Value

float|string

static float|string IRR(float[] $values, float $guess = 0.1)

IRR.

Returns the internal rate of return for a series of cash flows represented by the numbers in values. These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received for an investment consisting of payments (negative values) and income (positive values) that occur at regular periods.

Excel Function: IRR(values[,guess])

Parameters

float[] $values An array or a reference to cells that contain numbers for which you want to calculate the internal rate of return. Values must contain at least one positive value and one negative value to calculate the internal rate of return.
float $guess A number that you guess is close to the result of IRR

Return Value

float|string

static ISPMT(...$args)

ISPMT.

Returns the interest payment for an investment based on an interest rate and a constant payment schedule.

Excel Function: =ISPMT(interest_rate, period, number_payments, PV)

interest_rate is the interest rate for the investment

period is the period to calculate the interest rate. It must be betweeen 1 and number_payments.

number_payments is the number of payments for the annuity

PV is the loan amount or present value of the payments

Parameters

...$args

static float|string MIRR(float[] $values, float $finance_rate, float $reinvestment_rate)

MIRR.

Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both the cost of the investment and the interest received on reinvestment of cash.

Excel Function: MIRR(values,finance_rate, reinvestment_rate)

Parameters

float[] $values An array or a reference to cells that contain a series of payments and income occurring at regular intervals. Payments are negative value, income is positive values.
float $finance_rate The interest rate you pay on the money used in the cash flows
float $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them

Return Value

float|string

static float|string NOMINAL(float $effect_rate = 0, int $npery = 0)

NOMINAL.

Returns the nominal interest rate given the effective rate and the number of compounding payments per year.

Parameters

float $effect_rate Effective interest rate
int $npery Number of compounding payments per year

Return Value

float|string

static float|string NPER(float $rate = 0, int $pmt = 0, float $pv = 0, float $fv = 0, int $type = 0)

NPER.

Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.

Parameters

float $rate Interest rate per period
int $pmt Periodic payment (annuity)
float $pv Present Value
float $fv Future Value
int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period

Return Value

float|string

static float NPV(...$args)

NPV.

Returns the Net Present Value of a cash flow series given a discount rate.

Parameters

...$args

Return Value

float

static float|string PDURATION(float $rate = 0, float $pv = 0, float $fv = 0)

PDURATION.

Calculates the number of periods required for an investment to reach a specified value.

Parameters

float $rate Interest rate per period
float $pv Present Value
float $fv Future Value

Return Value

float|string

static float PMT(float $rate = 0, int $nper = 0, float $pv = 0, float $fv = 0, int $type = 0)

PMT.

Returns the constant payment (annuity) for a cash flow with a constant interest rate.

Parameters

float $rate Interest rate per period
int $nper Number of periods
float $pv Present Value
float $fv Future Value
int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period

Return Value

float

static float PPMT(float $rate, int $per, int $nper, float $pv, float $fv = 0, int $type = 0)

PPMT.

Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.

Parameters

float $rate Interest rate per period
int $per Period for which we want to find the interest
int $nper Number of periods
float $pv Present Value
float $fv Future Value
int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period

Return Value

float

static PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0)

Parameters

$settlement
$maturity
$rate
$yield
$redemption
$frequency
$basis

static float PRICEDISC(mixed $settlement, mixed $maturity, int $discount, int $redemption, int $basis = 0)

PRICEDISC.

Returns the price per $100 face value of a discounted security.

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
int $discount The security's discount rate
int $redemption The security's redemption value per $100 face value
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float

static float PRICEMAT(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $yield, int $basis = 0)

PRICEMAT.

Returns the price per $100 face value of a security that pays interest at maturity.

Parameters

mixed $settlement The security's settlement date. The security's settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $issue The security's issue date
int $rate The security's interest rate at date of issue
int $yield The security's annual yield
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float

static float PV(float $rate = 0, int $nper = 0, float $pmt = 0, float $fv = 0, int $type = 0)

PV.

Returns the Present Value of a cash flow with constant payments and interest rate (annuities).

Parameters

float $rate Interest rate per period
int $nper Number of periods
float $pmt Periodic payment (annuity)
float $fv Future Value
int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period

Return Value

float

static float RATE(float $nper, float $pmt, float $pv, float $fv = 0.0, int $type = 0, float $guess = 0.1)

RATE.

Returns the interest rate per period of an annuity. RATE is calculated by iteration and can have zero or more solutions. If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, RATE returns the #NUM! error value.

Excel Function: RATE(nper,pmt,pv[,fv[,type[,guess]]])

Parameters

float $nper The total number of payment periods in an annuity
float $pmt The payment made each period and cannot change over the life of the annuity. Typically, pmt includes principal and interest but no other fees or taxes.
float $pv The present value - the total amount that a series of future payments is worth now
float $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).
int $type A number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.
float $guess Your guess for what the rate will be. If you omit guess, it is assumed to be 10 percent.

Return Value

float

static float RECEIVED(mixed $settlement, mixed $maturity, int $investment, int $discount, int $basis = 0)

RECEIVED.

Returns the price per $100 face value of a discounted security.

Parameters

mixed $settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
int $investment The amount invested in the security
int $discount The security's discount rate
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float

static float|string RRI(float $nper = 0, float $pv = 0, float $fv = 0)

RRI.

Calculates the interest rate required for an investment to grow to a specified future value .

Parameters

float $nper The number of periods over which the investment is made
float $pv Present Value
float $fv Future Value

Return Value

float|string

static float|string SLN(mixed $cost, mixed $salvage, mixed $life)

SLN.

Returns the straight-line depreciation of an asset for one period

Parameters

mixed $cost Initial cost of the asset
mixed $salvage Value at the end of the depreciation
mixed $life Number of periods over which the asset is depreciated

Return Value

float|string

static float|string SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period)

SYD.

Returns the sum-of-years' digits depreciation of an asset for a specified period.

Parameters

mixed $cost Initial cost of the asset
mixed $salvage Value at the end of the depreciation
mixed $life Number of periods over which the asset is depreciated
mixed $period Period

Return Value

float|string

static float TBILLEQ(mixed $settlement, mixed $maturity, int $discount)

TBILLEQ.

Returns the bond-equivalent yield for a Treasury bill.

Parameters

mixed $settlement The Treasury bill's settlement date. The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
mixed $maturity The Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires.
int $discount The Treasury bill's discount rate

Return Value

float

static float TBILLPRICE(mixed $settlement, mixed $maturity, int $discount)

TBILLPRICE.

Returns the yield for a Treasury bill.

Parameters

mixed $settlement The Treasury bill's settlement date. The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
mixed $maturity The Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires.
int $discount The Treasury bill's discount rate

Return Value

float

static float TBILLYIELD(mixed $settlement, mixed $maturity, int $price)

TBILLYIELD.

Returns the yield for a Treasury bill.

Parameters

mixed $settlement The Treasury bill's settlement date. The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
mixed $maturity The Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires.
int $price The Treasury bill's price per $100 face value

Return Value

float

static XIRR($values, $dates, $guess = 0.1)

Parameters

$values
$dates
$guess

static float XNPV(float $rate, array $values, array $dates)

XNPV.

Returns the net present value for a schedule of cash flows that is not necessarily periodic. To calculate the net present value for a series of cash flows that is periodic, use the NPV function.

Excel Function: =XNPV(rate,values,dates)

Parameters

float $rate the discount rate to apply to the cash flows
array $values of float $values A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value.
array $dates of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order.

Return Value

float

static float YIELDDISC(mixed $settlement, mixed $maturity, int $price, int $redemption, int $basis = 0)

YIELDDISC.

Returns the annual yield of a security that pays interest at maturity.

Parameters

mixed $settlement The security's settlement date. The security's settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
int $price The security's price per $100 face value
int $redemption The security's redemption value per $100 face value
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float

static float YIELDMAT(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $price, int $basis = 0)

YIELDMAT.

Returns the annual yield of a security that pays interest at maturity.

Parameters

mixed $settlement The security's settlement date. The security's settlement date is the date after the issue date when the security is traded to the buyer.
mixed $maturity The security's maturity date. The maturity date is the date when the security expires.
mixed $issue The security's issue date
int $rate The security's interest rate at date of issue
int $price The security's price per $100 face value
int $basis The type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360

Return Value

float