Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/CapFloor-surfaces-tp5575p5576.html
On Tue, 2009-11-17 at 09:12 -0800, Shuaib Osman wrote:
> I'm still learning QuantLib so appologies in advance if this is something
> trivial. I'm trying to price some caps/floors in python. I've managed to
> create a list of IborCoupons and an IborIndex for the instrument easily
> enough. When I try to use the BlackCapFloorEngine the second parameter is a
> Handle to a OptionletVolatilityStructure (not a CapFloorTermVolCurve). I've
> been looking at the source and have not yet seen a derived class of
> OptionletVolatilityStructure which supports a strike/term vol surface (like
> CapFloorTermVolSurface - which is not even exported to python).
>
> [...]
>
> How do I go about creating a OptionletVolatilityStructure with strikes/dates
> for the BlackCapFloorEngine?
I'm still trying to wrap my head myself around those classes (Nando,
maybe you could step in?). The quickest thing might be to disregard the
fact that CapletVarianceCurve is deprecated and write something similar
for strikes/dates instead of just dates (you can follow the structure
of, for example, BlackVarianceSurface.) Once you have that in C++,
exporting it to Python shouldn't be hard if you clone what's already
there.
Luigi
--
Though this be madness, yet there is method in't.
-- Hamlet, Act II, scene II
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users