Why does the ACCRFRAC function not work properly in the Finanancial Toolbox 2.4.2 (R14SP1)?

1 view (last 30 days)
The ACCRFRAC command does not work properly and gives me an error when the input argument "Basis" is set to 6:
accrfrac('12/5/2004','1/29/2009',1,6,1)
??? Index exceeds matrix dimensions.
Error in ==> dateoffset at 185
CpnDay(LookupIndex) = DayTable(DayTableIndex);
Error in ==> cpndatep at 158
[CpnDay, CpnMonth, CpnYear] = dateoffset(referenceDate(:,3), referenceDate(:,2), ...
Error in ==> accrfrac at 96
PreviousCouponDate = cpndatep(Settle, Maturity, Period, Basis, ...

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in the Financial Toolbox version 2.4.2 (R14SP1) in the way day count fraction (either directly through ACCRFRAC or indirectly though CPNPERSZ) is different for the various "30/360" conventions.
This occurs whenever the "Basis" argument is 4-7.
There are currently no workarounds.

More Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!