53 $frequency = FinancialConstants::FREQUENCY_ANNUAL,
54 $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD,
55 $calcMethod = self::ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT
62 $frequency = ($frequency === null)
63 ? FinancialConstants::FREQUENCY_ANNUAL
65 $basis = ($basis === null)
66 ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
78 return $e->getMessage();
82 if (!is_numeric($daysBetweenIssueAndSettlement)) {
84 return $daysBetweenIssueAndSettlement;
86 $daysBetweenFirstInterestAndSettlement =
YearFrac::fraction($firstInterest, $settlement, $basis);
87 if (!is_numeric($daysBetweenFirstInterestAndSettlement)) {
89 return $daysBetweenFirstInterestAndSettlement;
92 return $parValue * $rate * $daysBetweenIssueAndSettlement;
122 $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
128 $basis = ($basis === null)
129 ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
140 return $e->getMessage();
144 if (!is_numeric($daysBetweenIssueAndSettlement)) {
146 return $daysBetweenIssueAndSettlement;
149 return $parValue * $rate * $daysBetweenIssueAndSettlement;
static atMaturity( $issue, $settlement, $rate, $parValue=1000, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
ACCRINTM.
const ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT
static validateSecurityPeriod($settlement, $maturity)
static validateIssueDate($issue)
static fraction($startDate, $endDate, $method=0)
YEARFRAC.
static periodic( $issue, $firstInterest, $settlement, $rate, $parValue=1000, $frequency=FinancialConstants::FREQUENCY_ANNUAL, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD, $calcMethod=self::ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT)
ACCRINT.
const ACCRINT_CALCMODE_FIRST_INTEREST_TO_SETTLEMENT
static validateRate($rate)
static validateSettlementDate($settlement)
static validateParValue($parValue)
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
static validateFrequency($frequency)
static validateBasis($basis)