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


3

As for the first question, the schedule should start from the issue date. The bond will manage cash flows correctly based on the evaluation date. The second is a bit trickier, and I don't think I have working code handy. The general idea is: if you want to add a spread to the rate of the bond (to go from discount margin to price) you'll have to modify the ...


3

I think to have the answer: use qlBondPreviousCashFlowDate() pointing at your FloatingRateBond object to get the last date of payment; use qlInterestRateIndexFixingDate() to get the fixing date referring to the last payment date; use qlIndexAddFixings() to add a fixing rate to the fixing date you got above; repeat for each one of your bonds if they share ...


3

Tenor is just a different term for time to maturity. A schedule is generated from startDate and endDate in combination with a time to maturity and some info on calendar specifics. Here is an example from Dimitri Reiswich' Presentation from quantlib.com, I hope it makes the use of schedule clearer to you: void testingSchedule1 (){ Date begin (30 , September ...


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!


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.


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