Hi Neil,
I've refactored the code you provided for binary barriers. The main reason was that I prefer to look at these options as American exercise option with binary payoff, instead of barrier options. As a matter of fact if one looks at the paper I've attached here one can notice that options 1-8 do not depend on the strike, they only depend on the barrier level. Just rename the barrier level as strike and one has gone from "binary barrier" to "American binary" options. Namely: 1) down-and-in cash-at-hit-or-nothing is American put with cash-at-hit-or-nothing binary payoff 2) up-and-in cash-at-hit-or-nothing is American call with cash-at-hit-or-nothing binary payoff 3) down-and-in asset-at-hit-or-nothing is American put with asset-at-hit-or-nothing binary payoff 4) up-and-in asset-at-hit-or-nothing is American call with asset-at-hit-or-nothing binary payoff 5) down-and-in cash-at-expiry-or-nothing is American put with cash-at-expiry-or-nothing binary payoff 6) up-and-in cash-at-expiry-or-nothing is American call with cash-at-expiry-or-nothing binary payoff 7) down-and-in asset-at-expiry-or-nothing is American put with asset-at-expiry-or-nothing binary payoff 8) up-and-in asset-at-expiry-or-nothing is American call with asset-at-expiry-or-nothing binary payoff As of now both the "binary barrier" and the "American digital" options are available in the QuantLib CVS. I am going to deprecated few files (in parenthesis the suggested alternative): 1) ql/MonteCarlo/binarybarrierpathpricer.*pp (ql/MonteCarlo/digitalpathpricer.*pp) 2) ql/PricingEngines/Barrier/analyticamericanbinarybarrierengine.*pp (ql/PricingEngines/Vanilla/analyticamericanengine.*pp) 3) ql/PricingEngines/Barrier/analyticeuropeanbinarybarrierengine.*pp (ql/PricingEngines/Vanilla/analyticeuropeanengine.*pp) 4) ql/PricingEngines/Barrier/mcbinarybarrierengine.hpp (ql/PricingEngines/Vanilla/mcdigitalengine.hpp) 5) ql/Instruments/binarybarrieroption.*pp (ql/Instruments/vanillaoption.*pp) I'm considering removing the deprecated files before the next release, unless anyone relies on them. I would do this for sake of clarity and because while moving from "binary barrier" to "American binary" I've also fixed few bugs and made little improvements which would require some time to be applied to binary barriers... I'm posting this to QuantLib-users since if anyone on this list wants to take a look at the code and give some feedback it would be welcome. There is also so much work still to do about the greeks of American at-hit and American at-expiry, on the MC simulation of the american cash-at-hit and American asset binary options, etc. BTW now American binary engines are available for whatever "vanilla" option we have in QuantLib. ciao -- Nando Binary Options.doc (117K) Download Attachment |
On Wed, Jan 21, 2004 at 12:59:02PM +0100, Ferdinando Ametrano wrote:
> As of now both the "binary barrier" and the "American digital" options are > available in the QuantLib CVS. I am going to deprecated few files (in > parenthesis the suggested alternative): > 1) ql/MonteCarlo/binarybarrierpathpricer.*pp > (ql/MonteCarlo/digitalpathpricer.*pp) > 2) ql/PricingEngines/Barrier/analyticamericanbinarybarrierengine.*pp > (ql/PricingEngines/Vanilla/analyticamericanengine.*pp) > 3) ql/PricingEngines/Barrier/analyticeuropeanbinarybarrierengine.*pp > (ql/PricingEngines/Vanilla/analyticeuropeanengine.*pp) > 4) ql/PricingEngines/Barrier/mcbinarybarrierengine.hpp > (ql/PricingEngines/Vanilla/mcdigitalengine.hpp) > 5) ql/Instruments/binarybarrieroption.*pp (ql/Instruments/vanillaoption.*pp) > > I'm considering removing the deprecated files before the next release, > unless anyone relies on them. I would do this for sake of clarity and RQuantLib does. So I'd need to redo my code. Which should be doable. But as you asked what would break ... Sounds like a cool change. Congrats! Dirk -- The relationship between the computed price and reality is as yet unknown. -- From the pac(8) manual page |
Hi Dirk
>RQuantLib does. So I'd need to redo my code. Which should be doable. But as >you asked what would break ... ok: I will wait for you to confirm that you moved from binarybarrier to vanilla with binary payoff and America exercise before removing the binarybarrier code. If you have any problem just ask and I'll try to help you. Usually I support the practice of deprecating code for the new release and removing the code in the next release, but this time I would prefer to remove the code in order not to have to back-port the fixes I did from American digital options to binary barrier options. ciao -- Nando |
Free forum by Nabble | Edit this page |