I am new to quantlib and I want use it to to price a touch option (single/double).

I searched on google for example code but I could not find anything. Hence, I am not sure if quantlib supports touch option.

Could you please give me some pointers?


1 Answer 1


Touch option is simply a barrier option in QuantLib. You could create one like a down-in barrier type. You can also set the payoff to a binary payoff. The payoff is represented by the StrikePayOff class. A comprehensible example is available on github here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.