0
$\begingroup$

How do you calculate the discount margin of a floating rate bond using flat yield? What is the formula?

$\endgroup$
0
$\begingroup$

I think you mean this:

enter image description here enter image description here

Another DM variant is this: enter image description here

Source:

enter image description here

This document has numerical examples.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you very much! $\endgroup$ – arnis Dec 30 '20 at 19:08
2
$\begingroup$

I am a co-author of that paper. You may want to check out FinancePy which is a beta version of a finance library where I have implemented the code for calculating the discount margin. Here is an example Jupyter notebook that reproduces (almost exactly) a Bloomberg example.

https://github.com/domokane/FinancePy/blob/master/notebooks/products/bonds/FINBONDFRN_CitigroupExample.ipynb

The underlying code is in

https://github.com/domokane/FinancePy/blob/master/financepy/products/bonds/FinBondFRN.py

Contact me at quant@financepy.com if you have any issues or questions regarding FinancePy.

$\endgroup$
2
  • $\begingroup$ Can your library also be used for bonds with irregular cashflows? Eg if I have modelled the cashflows from an ABS / RMBS / bespoke investment separately (I don't want your library to do that), can I use your library to calculate the DM of those cashflows? $\endgroup$ – Pythonista anonymous Feb 9 at 23:09
  • $\begingroup$ It should be possible - you would need to set the internal date and flow schedule (one is a list of dates and the other is a list of floats) - as everything is open in Python this should be possible. Can you add this as a request on github issues github.com/domokane/FinancePy/issues and I can see if I can add a method which makes it easier to do and has some validation checks. Or contact me via quant@financepy.com $\endgroup$ – Dom Feb 10 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.