Tag Info

Hot answers tagged

6

Day-count conventions. You can't live with them, you can't live without them. The reason the prices differ is that the pricing engine can't calculate correctly the time over which the first coupon is discounted, and thus it gets slightly different discount factors to apply to the coupon amounts. Please sit down, it'll take some explaining. Ultimately, both ...


5

There's no class at this time to add two curves as you want, but it won't be much difficult to write it. The closest you'll get in the library is the ZeroSpreadedTermStructure class, that shows the general idea: it inherits from YieldTermStructure (by way of ZeroYieldStructure) takes a YieldTermStructure and a spread (constant, in this case) and override ...


4

It's because of the settlement days you passed when you initialized the flat volatility curve. You're creating the spot, forward and flat volatilities as: boost::shared_ptr<BlackVarianceSurface> volatilitySurface( new BlackVarianceSurface(todaysDate, calendar, maturityArray, strikeArray, ...


4

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 ...


3

Answering my own question: use qlFloatingRateBond and pass it a range of strikes (one for each coupon) for both Caps and Floors arguments use BondEngine as pricing engine use IborCouponPricer with Type argument equal to "IborByBlack" as coupon pricer - This pricer also takes an OptionletVolatilitySurface as input the OptionletVolatilitySurface can be ...


3

It's hard to be sure without seeing the inputs, but I'm guessing that the implied curve changes shape because the original curve does (which you can see from your output: except for the 1-year and 5-years points, the actual discounts are different). The reason the original curve changes is probably the different position of weekends or holidays (so that, ...


2

A free to use Excel Add-on providing QuantLib-backed derivatives pricing analytics directly in Excel is available at http://www.deriscope.com Disclosure: answerer is author of the package.


2

Answering my own question: All the indicated numbers as obtained from ICAP need to be divided by 100, as they are percentages The OptionletStripper1 takes an IborIndex, which should have a tenor equal to 1Y. I had set it to 6M, and that seemed to cause problems Ouch!


1

You can obtain the desired effect by tweaking the bond construction. For instance, let's say you're creating a 4-years bond with semiannual coupons paying 3%, but missing the last. This makes for 7 coupons. Instead, you'll create the schedule as usual (so you have 8 periods), but specify a null last coupon when creating the bond. So: Schedule schedule = ...



Only top voted, non community-wiki answers of a minimum length are eligible