|
From: Wei Li <ttl...@gm...> - 2021-09-29 07:42:31
|
Dear All, I am investigating how to price a modified version of overnight indexed swaption using black model based on QuantLib released version 1.23. From what I can see, both engines defined in blackswaptionengine.hpp, namingly, BlackStyleSwaptionEngine and BachelierSwaptionEngine, inherit from Swaption::engine, and the underlying of Swaption is of type VanillaSwap. There is actually another OvernightIndexedSwap class parallel to VanillaSwap. Does it mean that I have to create both OIS swaption class as well as BlackStyleSwaptionEngine classes for it? I feel that most of the code would be the same as VanillaSwap/Swaption/original BlackStyleSwaptionEngine. So am I understanding it wrongly? Or is it feasible to create base classes for general Swaption/SwaptionEngine? A question from the other side, what's preventing us from merging both VanillaSwap and OvernightIndexedSwap and delegating the job of calculating the applied-rate (I might be missing something of the essence)? Cheers, Wei |