Coupnum fix (#1069)
* New Unit Tests for COUPNUM() * COUPNUM should not return zero when settlement is in the last period * Additional tests and fixes for COUPNCD() and COUPPCD() functions * Additional tests and fixes for COUPNCD() and COUPPCD() functions
This commit is contained in:
parent
0ea97f14e1
commit
de3f948b27
|
@ -417,7 +417,7 @@ class Financial
|
||||||
return Functions::VALUE();
|
return Functions::VALUE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($settlement > $maturity) ||
|
if (($settlement >= $maturity) ||
|
||||||
(!self::isValidFrequency($frequency)) ||
|
(!self::isValidFrequency($frequency)) ||
|
||||||
(($basis < 0) || ($basis > 4))) {
|
(($basis < 0) || ($basis > 4))) {
|
||||||
return Functions::NAN();
|
return Functions::NAN();
|
||||||
|
@ -476,7 +476,7 @@ class Financial
|
||||||
return Functions::VALUE();
|
return Functions::VALUE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($settlement > $maturity) ||
|
if (($settlement >= $maturity) ||
|
||||||
(!self::isValidFrequency($frequency)) ||
|
(!self::isValidFrequency($frequency)) ||
|
||||||
(($basis < 0) || ($basis > 4))) {
|
(($basis < 0) || ($basis > 4))) {
|
||||||
return Functions::NAN();
|
return Functions::NAN();
|
||||||
|
@ -550,7 +550,7 @@ class Financial
|
||||||
return Functions::VALUE();
|
return Functions::VALUE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($settlement > $maturity) ||
|
if (($settlement >= $maturity) ||
|
||||||
(!self::isValidFrequency($frequency)) ||
|
(!self::isValidFrequency($frequency)) ||
|
||||||
(($basis < 0) || ($basis > 4))) {
|
(($basis < 0) || ($basis > 4))) {
|
||||||
return Functions::NAN();
|
return Functions::NAN();
|
||||||
|
|
Loading…
Reference in New Issue