25 return self::validateDate($settlement);
33 return self::validateDate($maturity);
41 if (!is_numeric($value)) {
45 return (
float) $value;
53 if (!is_numeric($value)) {
57 return (
int) floor((
float) $value);
65 $rate = self::validateFloat($rate);
78 $frequency = self::validateInt($frequency);
80 ($frequency !== FinancialConstants::FREQUENCY_ANNUAL) &&
81 ($frequency !== FinancialConstants::FREQUENCY_SEMI_ANNUAL) &&
82 ($frequency !== FinancialConstants::FREQUENCY_QUARTERLY)
95 if (!is_numeric($basis)) {
99 $basis = (int) $basis;
100 if (($basis < 0) || ($basis > 4)) {
112 $price = self::validateFloat($price);
125 $parValue = self::validateFloat($parValue);
126 if ($parValue < 0.0) {
138 $yield = self::validateFloat($yield);
151 $discount = self::validateFloat($discount);
152 if ($discount <= 0.0) {
static validateDate($date)
static validateYield($yield)
static validatePrice($price)
static validateMaturityDate($maturity)
static getDateValue($dateValue, bool $allowBool=true)
getDateValue.
static validateRate($rate)
static validateSettlementDate($settlement)
static validateFloat($value)
static validateInt($value)
static validateParValue($parValue)
static validateDiscount($discount)
static validateFrequency($frequency)
static validateBasis($basis)