lballabio / QuantLib

The QuantLib C++ library
http://quantlib.org
Other
5k stars 1.73k forks source link

Support calculation for Partial time barrier PUT options and expose to Python-SWIG #1986

Open flogger007 opened 1 month ago

flogger007 commented 1 month ago

On Tue, 7 May 2024 at 20:35, Luigi Ballabio [luigi.ballabio@gmail.com](mailto:luigi.ballabio@gmail.com) wrote: Does this also hold for partial-time barrier options?

Luigi

On Mon, Apr 29, 2024 at 9:44 AM Ashish Bansal [ashish4bansal@gmail.com](mailto:ashish4bansal@gmail.com) wrote: Hi all,

I am looking at the Partial Time barrier code to calculate the value of PTB options and noticed that the Put is not supported: https://rkapl123.github.io/QLAnnotatedSource/d0/d16/analyticpartialtimebarrieroptionengine_8cpp_source.html Line# 111: case Option::Put: QL_FAIL("Partial-time barrier Put option is not implemented");

I was wondering if the Put valuation can be implemented using the Put-Call Symmetry given in the Haug book, section # 4.17.8: Use of Put-Call Symmetry for Barrier Options image

P.S. I am using Python SWIG so need this supported in there too.

Regards Ashish