Fixed income bonds: How to deal with ex-dividend trading

Is there some predefined functionality in MATLAB and/or its toolboxes to deal with fixed income calculations (accrued interest; pricing given a yield curve; yield to maturity<-->price conversion; etc.) for bonds that trade ex-dividend?
(Just to avoid misunderstandings: this is not about equities or convertible bonds, but about fixed income bonds that trade ex-dividend, i.e. if they are sold such that the settlement date lies within a certain period before the next coupon, the coupon payment will go to the seller and not to the buyer, even though the buyer will then be the holder). Thanks, Oliver

1 commentaire

Hi Oliver. Did you ever find anything. I have a similar problem - I can't see any way of using the builtin bndprice() to take into account ex-coupon conventions.

Connectez-vous pour commenter.

Réponses (1)

Oleg Komarov
Oleg Komarov le 16 Août 2012

0 votes

Have you looked into the Financial Toolbox and the Fixed-Income Toolbox?

9 commentaires

Oliver
Oliver le 16 Août 2012
I searched in the full documentation on The Mathwork's web site, so that I had all toolboxes included and I also checked other sources like this forum but found nothing so far. Kind of strange, because MATLAB and in particular the two toolboxes you mentioned offer quite a lot of even exotic things, while ex-dividend bonds are not quite that exotic: some european covered bonds and even UK's sovereign bonds (Gilts) trade ex-dividend.
Oleg Komarov
Oleg Komarov le 16 Août 2012
Modifié(e) : Oleg Komarov le 16 Août 2012
Oliver
Oliver le 17 Août 2012
Modifié(e) : Oliver le 17 Août 2012
I am afraid that this only useful for the pricing of options and that the mentioned parameters apply only for the special case of equity options and then describe the dividend of the underlying equity. However, the concept of bonds trading ex-dividend is completely different from equity dividends, except for the name :-(
Yeah, sorry I rushed.
You can use bndprice() and if settlement date falls after the ex-coupon, simply subtract the AccruedInterest from the clean price.
Oliver
Oliver le 21 Août 2012
Yes, I am aware of that possibility (i.e. substract the full coupon from the conventionally calculated AI to get the AI in an ex-dividend period). However, things are not as simple as they appear at first glance, as there are a lot of exceptions that I then have to deal with in a performance-critical application:
First, there are long first/last coupons that I need to be aware of.
Second, there are day count calculation methods (at least the one called 'actual/365 ISDA' in Matlab) in which two day count fractions that together span a full coupon period, do not always add up to 1/CouponFrequency. However, if one takes a closer look at the formulas in Krgin's book (which is by far the best on that topic known to me and which is also quoted on the help page you mentioned), it becomes apparent that this additivity is needed to justify the above 'subtract the coupon-rule'.
As I coded all these things based on Krgin's book in Excel/VBA some years ago, I can tell that this is no fun... And moreover, I am afraid that this would be no good for performance issues. That's why I hoped that there were something bult-in in MATLAB.
Unfortunately, I do not fully understand the issue, thus I cannot elaborate more on that. however, I trust you on the claim that there are exceptions.
You might want to submit an enhancement request to http://www.mathworks.co.uk/support/service_requests/contact_support.do: technical support > Request an enhancement providing a clear example of one of the exceptions that would require manual adjustments to the simple Clean - AI.
Oliver
Oliver le 22 Août 2012
Thanks a lot, Oleg, for all your support. I will come back on your idea to place an enhancement request. At the moment, I am rather new to MATLAB and wonder if it makes sense to rebuild my old (but still working) Excel/VBA application with MATLAB. So I will further study things and maybe I will find a better workaround as the one I see right now. If not, I will place such a request...
Well, you can simply ask for support, and they can provide a workaround. The community is one way to get advice, the other is to ask TMW (license allowing, the student version allows reporting bugs only)
Oliver, since you already programmed it in VBA, perhaps you could just use MATLAB to tell VBA what it needs and then retrieve the results?

Connectez-vous pour commenter.

Catégories

Question posée :

le 16 Août 2012

Commenté :

le 14 Sep 2017

Community Treasure Hunt

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

Start Hunting!

Translated by