[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/phpexcel/PHPExcel/Calculation/ -> Financial.php (summary)

(no description)

File Size: 2359 lines (109 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PHPExcel_Calculation_Financial:: (51 methods):
  isLastDayOfMonth()
  isFirstDayOfMonth()
  couponFirstPeriodDate()
  isValidFrequency()
  daysPerYear()
  interestAndPrincipal()
  ACCRINT()
  ACCRINTM()
  AMORDEGRC()
  AMORLINC()
  COUPDAYBS()
  COUPDAYS()
  COUPDAYSNC()
  COUPNCD()
  COUPNUM()
  COUPPCD()
  CUMIPMT()
  CUMPRINC()
  DB()
  DDB()
  DISC()
  DOLLARDE()
  DOLLARFR()
  EFFECT()
  FV()
  FVSCHEDULE()
  INTRATE()
  IPMT()
  IRR()
  ISPMT()
  MIRR()
  NOMINAL()
  NPER()
  NPV()
  PMT()
  PPMT()
  PRICE()
  PRICEDISC()
  PRICEMAT()
  PV()
  RATE()
  RECEIVED()
  SLN()
  SYD()
  TBILLEQ()
  TBILLPRICE()
  TBILLYIELD()
  XIRR()
  XNPV()
  YIELDDISC()
  YIELDMAT()


Class: PHPExcel_Calculation_Financial  - X-Ref

PHPExcel_Calculation_Financial

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

isLastDayOfMonth($testDate)   X-Ref
isLastDayOfMonth

Returns a boolean TRUE/FALSE indicating if this date is the last date of the month

param: DateTime    $testDate    The date for testing
return: boolean

isFirstDayOfMonth($testDate)   X-Ref
isFirstDayOfMonth

Returns a boolean TRUE/FALSE indicating if this date is the first date of the month

param: DateTime    $testDate    The date for testing
return: boolean

couponFirstPeriodDate($settlement, $maturity, $frequency, $next)   X-Ref
No description

isValidFrequency($frequency)   X-Ref
No description

daysPerYear($year, $basis = 0)   X-Ref
daysPerYear

Returns the number of days in a specified year, as defined by the "basis" value

param: integer        $year    The year against which we're testing
param: integer        $basis    The type of day count:
return: integer

interestAndPrincipal($rate = 0, $per = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0)   X-Ref
No description

ACCRINT($issue, $firstinterest, $settlement, $rate, $par = 1000, $frequency = 1, $basis = 0)   X-Ref
ACCRINT

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

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

param: mixed    $issue            The security's issue date.
param: mixed    $firstinterest    The security's first interest date.
param: mixed    $settlement        The security's settlement date.
param: float    $rate            The security's annual coupon rate.
param: float    $par            The security's par value.
param: integer    $frequency        the number of coupon payments per year.
param: integer    $basis            The type of day count to use.
return: float

ACCRINTM($issue, $settlement, $rate, $par = 1000, $basis = 0)   X-Ref
ACCRINTM

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

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

param: mixed    issue        The security's issue date.
param: mixed    settlement    The security's settlement (or maturity) date.
param: float    rate        The security's annual coupon rate.
param: float    par            The security's par value.
param: integer    basis        The type of day count to use.
return: float

AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0)   X-Ref
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])

param: float    cost        The cost of the asset.
param: mixed    purchased    Date of the purchase of the asset.
param: mixed    firstPeriod    Date of the end of the first period.
param: mixed    salvage        The salvage value at the end of the life of the asset.
param: float    period        The period.
param: float    rate        Rate of depreciation.
param: integer    basis        The type of day count to use.
return: float

AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0)   X-Ref
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])

param: float    cost        The cost of the asset.
param: mixed    purchased    Date of the purchase of the asset.
param: mixed    firstPeriod    Date of the end of the first period.
param: mixed    salvage        The salvage value at the end of the life of the asset.
param: float    period        The period.
param: float    rate        Rate of depreciation.
param: integer    basis        The type of day count to use.
return: float

COUPDAYBS($settlement, $maturity, $frequency, $basis = 0)   X-Ref
COUPDAYBS

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

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    frequency    the number of coupon payments per year.
param: integer        basis        The type of day count to use.
return: float

COUPDAYS($settlement, $maturity, $frequency, $basis = 0)   X-Ref
COUPDAYS

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

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    frequency    the number of coupon payments per year.
param: integer        basis        The type of day count to use.
return: float

COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0)   X-Ref
COUPDAYSNC

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

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    frequency    the number of coupon payments per year.
param: integer        basis        The type of day count to use.
return: float

COUPNCD($settlement, $maturity, $frequency, $basis = 0)   X-Ref
COUPNCD

Returns the next coupon date after the settlement date.

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    frequency    the number of coupon payments per year.
param: integer        basis        The type of day count to use.
return: mixed    Excel date/time serial value, PHP date/time serial value or PHP date/time object,

COUPNUM($settlement, $maturity, $frequency, $basis = 0)   X-Ref
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])

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    frequency    the number of coupon payments per year.
param: integer        basis        The type of day count to use.
return: integer

COUPPCD($settlement, $maturity, $frequency, $basis = 0)   X-Ref
COUPPCD

Returns the previous coupon date before the settlement date.

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    frequency    the number of coupon payments per year.
param: integer        basis        The type of day count to use.
return: mixed    Excel date/time serial value, PHP date/time serial value or PHP date/time object,

CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0)   X-Ref
CUMIPMT

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

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

param: float    $rate    The Interest rate
param: integer    $nper    The total number of payment periods
param: float    $pv        Present Value
param: integer    $start    The first period in the calculation.
param: integer    $end    The last period in the calculation.
param: integer    $type    A number 0 or 1 and indicates when payments are due:
return: float

CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0)   X-Ref
CUMPRINC

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

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

param: float    $rate    The Interest rate
param: integer    $nper    The total number of payment periods
param: float    $pv        Present Value
param: integer    $start    The first period in the calculation.
param: integer    $end    The last period in the calculation.
param: integer    $type    A number 0 or 1 and indicates when payments are due:
return: float

DB($cost, $salvage, $life, $period, $month = 12)   X-Ref
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])

param: float    cost        Initial cost of the asset.
param: float    salvage        Value at the end of the depreciation.
param: integer    life        Number of periods over which the asset is depreciated.
param: integer    period        The period for which you want to calculate the
param: integer    month        Number of months in the first year. If month is omitted,
return: float

DDB($cost, $salvage, $life, $period, $factor = 2.0)   X-Ref
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])

param: float    cost        Initial cost of the asset.
param: float    salvage        Value at the end of the depreciation.
param: integer    life        Number of periods over which the asset is depreciated.
param: integer    period        The period for which you want to calculate the
param: float    factor        The rate at which the balance declines.
return: float

DISC($settlement, $maturity, $price, $redemption, $basis = 0)   X-Ref
DISC

Returns the discount rate for a security.

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: integer    price        The security's price per $100 face value.
param: integer    redemption    The security's redemption value per $100 face value.
param: integer    basis        The type of day count to use.
return: float

DOLLARDE($fractional_dollar = null, $fraction = 0)   X-Ref
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)

param: float    $fractional_dollar    Fractional Dollar
param: integer    $fraction            Fraction
return: float

DOLLARFR($decimal_dollar = null, $fraction = 0)   X-Ref
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)

param: float    $decimal_dollar        Decimal Dollar
param: integer    $fraction            Fraction
return: float

EFFECT($nominal_rate = 0, $npery = 0)   X-Ref
EFFECT

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

Excel Function:
EFFECT(nominal_rate,npery)

param: float    $nominal_rate        Nominal interest rate
param: integer    $npery                Number of compounding payments per year
return: float

FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0)   X-Ref
FV

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

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

param: float    $rate    The interest rate per period
param: int        $nper    Total number of payment periods in an annuity
param: float    $pmt    The payment made each period: it cannot change over the
param: float    $pv        Present Value, or the lump-sum amount that a series of
param: integer    $type    A number 0 or 1 and indicates when payments are due:
return: float

FVSCHEDULE($principal, $schedule)   X-Ref
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)

param: float    $principal    The present value.
param: float[]    $schedule    An array of interest rates to apply.
return: float

INTRATE($settlement, $maturity, $investment, $redemption, $basis = 0)   X-Ref
INTRATE

Returns the interest rate for a fully invested security.

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

param: mixed    $settlement    The security's settlement date.
param: mixed    $maturity    The security's maturity date.
param: integer    $investment    The amount invested in the security.
param: integer    $redemption    The amount to be received at maturity.
param: integer    $basis        The type of day count to use.
return: float

IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0)   X-Ref
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])

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

IRR($values, $guess = 0.1)   X-Ref
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])

param: float[]    $values        An array or a reference to cells that contain numbers for which you want
param: float    $guess        A number that you guess is close to the result of IRR
return: float

ISPMT()   X-Ref
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

MIRR($values, $finance_rate, $reinvestment_rate)   X-Ref
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)

param: float[]    $values                An array or a reference to cells that contain a series of payments and
param: float    $finance_rate        The interest rate you pay on the money used in the cash flows
param: float    $reinvestment_rate    The interest rate you receive on the cash flows as you reinvest them
return: float

NOMINAL($effect_rate = 0, $npery = 0)   X-Ref
NOMINAL

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

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

NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0)   X-Ref
NPER

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

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

NPV()   X-Ref
NPV

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

return: float

PMT($rate = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0)   X-Ref
PMT

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

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

PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0)   X-Ref
PPMT

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

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

PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0)   X-Ref
No description

PRICEDISC($settlement, $maturity, $discount, $redemption, $basis = 0)   X-Ref
PRICEDISC

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: int        discount    The security's discount rate.
param: int        redemption    The security's redemption value per $100 face value.
param: int        basis        The type of day count to use.
return: float

PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis = 0)   X-Ref
PRICEMAT

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: mixed    issue        The security's issue date.
param: int        rate        The security's interest rate at date of issue.
param: int        yield        The security's annual yield.
param: int        basis        The type of day count to use.
return: float

PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0)   X-Ref
PV

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

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

RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1)   X-Ref
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]]])

param: float    nper        The total number of payment periods in an annuity.
param: float    pmt            The payment made each period and cannot change over the life
param: float    pv            The present value - the total amount that a series of future
param: float    fv            The future value, or a cash balance you want to attain after
param: integer    type        A number 0 or 1 and indicates when payments are due:
param: float    guess        Your guess for what the rate will be.
return: float

RECEIVED($settlement, $maturity, $investment, $discount, $basis = 0)   X-Ref
RECEIVED

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

param: mixed    settlement    The security's settlement date.
param: mixed    maturity    The security's maturity date.
param: int        investment    The amount invested in the security.
param: int        discount    The security's discount rate.
param: int        basis        The type of day count to use.
return: float

SLN($cost, $salvage, $life)   X-Ref
SLN

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

param: cost        Initial cost of the asset
param: salvage        Value at the end of the depreciation
param: life        Number of periods over which the asset is depreciated
return: float

SYD($cost, $salvage, $life, $period)   X-Ref
SYD

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

param: cost        Initial cost of the asset
param: salvage        Value at the end of the depreciation
param: life        Number of periods over which the asset is depreciated
param: period        Period
return: float

TBILLEQ($settlement, $maturity, $discount)   X-Ref
TBILLEQ

Returns the bond-equivalent yield for a Treasury bill.

param: mixed    settlement    The Treasury bill's settlement date.
param: mixed    maturity    The Treasury bill's maturity date.
param: int        discount    The Treasury bill's discount rate.
return: float

TBILLPRICE($settlement, $maturity, $discount)   X-Ref
TBILLPRICE

Returns the yield for a Treasury bill.

param: mixed    settlement    The Treasury bill's settlement date.
param: mixed    maturity    The Treasury bill's maturity date.
param: int        discount    The Treasury bill's discount rate.
return: float

TBILLYIELD($settlement, $maturity, $price)   X-Ref
TBILLYIELD

Returns the yield for a Treasury bill.

param: mixed    settlement    The Treasury bill's settlement date.
param: mixed    maturity    The Treasury bill's maturity date.
param: int        price        The Treasury bill's price per $100 face value.
return: float

XIRR($values, $dates, $guess = 0.1)   X-Ref
No description

XNPV($rate, $values, $dates)   X-Ref
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)

param: float            $rate        The discount rate to apply to the cash flows.
param: array of float    $values     A series of cash flows that corresponds to a schedule of payments in dates.
param: array of mixed    $dates      A schedule of payment dates that corresponds to the cash flow payments.
return: float

YIELDDISC($settlement, $maturity, $price, $redemption, $basis = 0)   X-Ref
YIELDDISC

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

param: mixed    settlement      The security's settlement date.
param: mixed    maturity        The security's maturity date.
param: int        price         The security's price per $100 face value.
param: int        redemption    The security's redemption value per $100 face value.
param: int        basis         The type of day count to use.
return: float

YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis = 0)   X-Ref
YIELDMAT

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

param: mixed    settlement     The security's settlement date.
param: mixed    maturity       The security's maturity date.
param: mixed    issue          The security's issue date.
param: int        rate         The security's interest rate at date of issue.
param: int        price        The security's price per $100 face value.
param: int        basis        The type of day count to use.
return: float



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1