Documentation

Periodic
in package

Table of Contents

Constants

FINANCIAL_MAX_ITERATIONS  = 128
FINANCIAL_PRECISION  = 1.0E-8

Methods

modifiedRate()  : float|string
MIRR.
presentValue()  : int|float
NPV.
rate()  : string|float
IRR.

Constants

FINANCIAL_MAX_ITERATIONS

public mixed FINANCIAL_MAX_ITERATIONS = 128

FINANCIAL_PRECISION

public mixed FINANCIAL_PRECISION = 1.0E-8

Methods

modifiedRate()

MIRR.

public static modifiedRate(mixed $values, mixed $financeRate, mixed $reinvestmentRate) : float|string

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
$values : mixed

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.

$financeRate : mixed

The interest rate you pay on the money used in the cash flows

$reinvestmentRate : mixed

The interest rate you receive on the cash flows as you reinvest them

Return values
float|string

Result, or a string containing an error

presentValue()

NPV.

public static presentValue(mixed $rate, array<string|int, mixed> ...$args) : int|float

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

Parameters
$rate : mixed
$args : array<string|int, mixed>
Return values
int|float

rate()

IRR.

public static rate(mixed $values[, mixed $guess = 0.1 ]) : string|float

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
$values : mixed

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.

$guess : mixed = 0.1

A number that you guess is close to the result of IRR

Return values
string|float

        
On this page

Search results