Yields
in package
Table of Contents
Methods
- yieldAtMaturity() : float|string
- YIELDMAT.
- yieldDiscounted() : float|string
- YIELDDISC.
Methods
yieldAtMaturity()
YIELDMAT.
public
static yieldAtMaturity(mixed $settlement, mixed $maturity, mixed $issue, mixed $rate, mixed $price[, mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD ]) : float|string
Returns the annual yield of a security that pays interest at maturity.
Parameters
- $settlement : mixed
-
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.
- $maturity : mixed
-
The security's maturity date. The maturity date is the date when the security expires.
- $issue : mixed
-
The security's issue date
- $rate : mixed
-
The security's interest rate at date of issue
- $price : mixed
-
The security's price per $100 face value
- $basis : mixed = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
-
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 values
float|string —Result, or a string containing an error
yieldDiscounted()
YIELDDISC.
public
static yieldDiscounted(mixed $settlement, mixed $maturity, mixed $price, mixed $redemption[, mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD ]) : float|string
Returns the annual yield of a security that pays interest at maturity.
Parameters
- $settlement : mixed
-
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.
- $maturity : mixed
-
The security's maturity date. The maturity date is the date when the security expires.
- $price : mixed
-
The security's price per $100 face value
- $redemption : mixed
-
The security's redemption value per $100 face value
- $basis : mixed = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
-
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 values
float|string —Result, or a string containing an error