Home » Math » Math_Finance » Bug #4643
Financial year count is wrong
Details
| Submitted | 2005-06-20 18:01 UTC |
|---|---|
| From | jon dot bertsch at ucop dot edu |
| Status | Bogus |
| Package | Math_Finance |
| PHP Version | 5.0.3 |
| OS | Linux SUSE 9.1 |
| Roadmaps | (Not assigned) |
Comments
[2005-06-20 18:01 UTC] jon dot bertsch at ucop dot edu
Description:
------------
Using FINANCE_COUNT_ACTUAL_360 as a basis for counting
daysDifference() gives the same result as
FINANCE_COUNT_ACTUAL_365. Should be 30 day months and a
360 year but it doesn't seem to show the correct result.
Testcase:
Days between 2005-07-01 and 2005-09-01
Actual days are 62
Financial days are 60
Using either basis above gives 62
[2005-06-20 18:10 UTC] jon dot bertsch at ucop dot edu
I looked at the method in the class and it looks like
you haven't gotten to that yet (or else I don't
understand how you labelled the basis types).
Apologies, probably should have checked the code first.
[2005-06-21 18:37 UTC] alejandro dot pedraza at dataenlace dot com
Using the financial convention X/Y,
FINANCE_COUNT_ACTUAL_360 stands for actual/360
FINANCE_COUNT_ACTUAL_365 stands for actual/365
Taken from Options, Futures & Other Derivatives (John C.Hull, Prentice Hall, 2000):
"When we are calculating the intereset earned between two dates, the X defines the way that the number of days between two dates are calculated [2005-07-01 and 2005-09-01 in your example], and Y defines the way that the total number of days in the reference period is calculated [e.g. semiannual coupon]".
The daysDifference() function only cares about X, that's why it returns the same when using FINANCE_COUNT_ACTUAL_360 or FINANCE_COUNT_ACTUAL_365.
[2005-06-21 18:41 UTC] alejandro dot pedraza at dataenlace dot com
bug closed