Why do I get an error of cash flow dates spanning across tree nodes using FLOATBYBK in the Financial Instruments Toolbox 1.0 (R2012b)?

4 views (last 30 days)
I am using the function FLOATBYBK to price Floating-Rate Notes (FRN) using the Black-Karasinski interest-rate tree. I choose a value of '4' for the parameter 'Reset' and I obtain the following error messages:
Warning: Not all cash flows are aligned with the tree. Result will be approximated.
> In floatengbytrintree at 214
In floatbybk at 136
Error using floatengbytrintree (line 319)
Instrument '1 ' has cash flow dates that span across tree nodes.
Error in floatbybk (line 136)
[Price, PriceTree, CFTree] = floatengbytrintree(BKTree, Spread, Settle, Maturity, OArgs{:});
What is the cause of this error? And How can it be addressed?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Oct 2013
The reason this error is thrown out is the mis-alignment between the dates in the Black-Karasinski tree that you built and the cash flow dates.
The way the tree in your use case is set up makes it impossible to determine the applicable rate used to compute the payoff at the tree nodes. The reason is that the information is lost during the recombination of the tree nodes.
One way to remedy this issue is to place the tree levels at the cash flow dates of the instrument, which is done when specifying the Time Specs in the BK tree.
Once you set up the Rate and Volatility Specs of the BK tree, you would need to define the Time Specs as follows:
Basis = intenvget(RateSpec, 'Basis');
EOM = intenvget(RateSpec, 'EndMonthRule');
resetDates = cfdates(ValuationDate, Maturity, resetVector, Basis, EOM);
BKTimeSpec = bktimespec(RateSpec.ValuationDate, resetDates, resetVector);
BKT = bktree(BKVolatilitySpec, RateSpec, BKTimeSpec);
Price = floatbybk(BKT, Spread, RateSpec.ValuationDate, ...
Maturity, 'Reset', resetVector)
where 'ValuationDate', 'Maturity',' etc. were used to define the FRN parameters.

More Answers (0)

Products


Release

R2012b

Community Treasure Hunt

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

Start Hunting!