Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Wandering through QuantLib's Financial instruments documentation, I noticed no class for fixed-to-floater bonds exist.

Then I was wondering what a suitable way to price such an instrument would be without the need to create a new class (in fact, fixed-to-floater should be just the discounted sum of a fixed rate bond and a floating rate one).

My idea is the following:

  1. to extract the clean price from an object of class FixedRateBond whose Schedule has termination date equal to the "swap" date and whose redemption is equal to zero;
  2. to extract the clean price from an object of class FloatingRateBond whose issue date is equal to the "swap" date;
  3. to sum 1 and 2.

Is the above proceeding correct?

Is there any faster way?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

I believe it's correct. However, consider that it would be easy enough, and more clear, to create a new class (at least in C++; the task is more difficult if you also want to export it to Excel). The new instrument should only inherit from Bond and implement a constructor that builds the desired cash flows via a call to FixedLeg and another to IborLeg; you can look at the constructors of FixedRateBond and FloatingRateBond to see how it's done. Any other functionality would be inherited from the Bond class.

share|improve this answer
    
Luigi, what do you think of this idea? Creating a new class that inherits from Bond and takes, as constructor, an array of Bonds and an array of dates. Bond A for example is a fixed rate one, and is valid from issue date to date X. Bond B is a floating rate one and is valid from date X to maturity. The "combined" class will take the cashflows of Bond A from issue date to date X and the cashflows of Bond B from date X to maturity. This way, the "combined" class will be totally generic, and could be used to combine any kind of bonds... –  Enrico Detoma Nov 27 '13 at 10:57
    
...I could create a step-up bond by combining two FloatingRateBonds with different spreads. I could create a bond which changes cap or floor at a certain date by combining two FloatingRateBonds with different caps and/or floors. The fixed-to-floater, as we already said, is the combination of a FixedRateBond with a FloatingRateBond, etc. –  Enrico Detoma Nov 27 '13 at 11:00
1  
That would work, too. Or you could just write a function that takes the same arguments and returns a vector of cashflows that can be passed to the existing Bond constructor. –  Luigi Ballabio Dec 2 '13 at 9:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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