901 reputation
34
bio website implementingquantlib.blogspot…
location
age
visits member for 3 years, 7 months
seen yesterday

Aug
5
comment QuantLib: Black / BSM processes and pricing via volatility surface. Different results?
Yes. You'll have to do the same for all curves, though, so also for risk-free rate and dividend yield. There's still a bit of dependence on the evaluation date, as the option checks it to see whether it's expired, but that won't affect the price.
Aug
5
comment QuantLib: Black / BSM processes and pricing via volatility surface. Different results?
In other words: for any term structure, the time to expiry is the time between its reference date (not the evaluation date) and the expiry date. This is on purpose! It's what makes possible to use forward curves at a given date, spot curves based a couple of days after today's date, and so on. As explained in the link I posted, the reference date can be specified explicitly (as in this case: you're passing forwardDate to the constructor) or as a number of days after the evaluation date. In the first case, the results will change with the evaluation date; in the second, they won't.
Aug
5
comment QuantLib: Black / BSM processes and pricing via volatility surface. Different results?
The calculation of the time to expiry is done internally by the volatility surface when returning the variance, and the surface doesn't realize that the time to expiry has changed, because its reference date didn't move (it was specified explicitly as a fixed date).
Aug
5
comment QuantLib: Black / BSM processes and pricing via volatility surface. Different results?
The forward volatility has a fixed reference date at July 24th 2014, so it always calculates variances relative to that date, regardless of the evaluation date you set. In addition, the risk-free and dividend curves do move with the evaluation date, but you set their rates to 0, so you're not getting any time effect from them, either. The reference date of the flat curve, instead, moves with the evaluation date so you see the value change for the third pricer.
Aug
4
answered QuantLib: Black / BSM processes and pricing via volatility surface. Different results?
Aug
4
comment QuantLib: Black / BSM processes and pricing via volatility surface. Different results?
I've tried to reproduce your figures, but the program as it is doesn't work. (Maybe some errors while pasting it here?) The issues I found: (a) the underlying variable in main is not defined and (b) the loop for(int i = 2975; i < 26; i = i + 25) to create strikeArray doesn't make sense (I guess you wanted to create 26 elements, but i is the value here, not the index).
Jun
19
comment Pricing a FixedRateBond in Quantlib: yield vs TermStructure
Thanks. I'm considering add "a gentleman and a scholar" on my profile :)
Jun
18
answered Pricing a FixedRateBond in Quantlib: yield vs TermStructure
Apr
30
comment novice question on fixed coupon schedule in QuantLib
Once you have build the schedule, you can retrieve the number of coupons as schedule.size()-1.
Apr
29
answered novice question on fixed coupon schedule in QuantLib
Apr
29
comment novice question on fixed coupon schedule in QuantLib
To check that I understand: do you mean that the last coupon is paid in 2020 and only the redemption is paid upon maturity in 2021?
Feb
9
awarded  Yearling
Dec
12
answered Finite difference methods
Dec
2
comment How to manage evaluation date changes in QuantLib while using ImpliedTermStructure Class
It depends. The cleanPrice and dirtyPrice methods discount to the settlement date (which moves with the evaluation date) and thus would return the same figures as when using the implied curve. On the other hand, the NPV method discounts to the reference date of the curve, so the result would be different. But even if it worked, it feels more like an unintended side effect than like something I'd document...
Dec
2
comment Pricing Fixed-To-Floater bond in QuantLib
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.
Nov
30
answered How to manage evaluation date changes in QuantLib while using ImpliedTermStructure Class
Nov
11
comment How to sum interest rate curves in QuantLib
As for the comment: if the spread were time-dependent, the shortcut would no longer apply.
Nov
11
comment How to sum interest rate curves in QuantLib
I think it's a leftover from a previous implementation. The idea was that of a shortcut to gain some performance; a constant spread over zero rates gives an equal constant spread on forwards, so we coded it directly instead of relying on the default implementation (which performed a numerical differentiation). But you're right, it's not used anymore and should disappear.
Nov
9
answered How to sum interest rate curves in QuantLib
Nov
8
comment How to sum interest rate curves in QuantLib
What are the spreads you're using for the second curve? You're passing them to SwapRateHelpers, so you're using them as swap rates; that is, you'll build a curve on which swaps paying those (fixed) rates are priced at par. Is this correct?