MATLAB: Does the PYLD2ZERO function in the Financial Toolbox 2.3 (R13) work improperly when ‘CurveDates(1)==Settle’

bugfinancialFinancial Toolboxpyld2zerotoolbox

The PYLD2ZERO function in the Financial Toolbox 2.3 (R13) works improperly when 'CurveDates(1)==Settle'.

Best Answer

This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in the Financial Toolbox 2.3 (R13) in the way that ZeroRates are calculated. Our development staff is currently investigating this issue.
To work around this issue, change line 180 of PYLD2ZERO from:
ZeroRatesZP(2:end+1) = ZeroRates;
to:
ZeroRatesZP(2:end+1) = ZeroRatesZP;