lballabio/quantlib — pull request #149 by rglarix (2014-10-15 13:51:51+00:00)
Title: double barrier options with tests, plus fixes for experimental engine

This patch set introduces an evolution of double barriers:

- fixes a bug in the current experimental engine affecting double knock-in options and vanna-volga test results.
- introduces a double barrier "analytical" engine (Ikeda/Kunitomo) with test cases lifted from literature, renaming the experimental engine to avoid conflicts.
- though elegant, modeling double barrier variations using an array of Barrier::Type instead of a specific enumeration is not very flexible. A new enum (DoubleBarrier::Type) with matching changes to other double barrier parameters leaves space for future growth.
- finally, the existing vanna-volga engine is transformed into a template and used/tested with both engines.