Skip to content
All library documents

Pricing Basket Barrier Options with a Custom Monte Carlo Engine

Article Quant Q&A · Author: user625626

Summary

The document explains how to approach pricing a barrier option on a basket when the available QuantLib Monte Carlo engines do not support both features together. It uses a worst-of down-and-in put as an example of the unsupported combination.

The suggested route is to adapt the European basket Monte Carlo engine and its path pricer. The engine can largely stay the same, while the path pricer must calculate the barrier payoff from each simulated multi-asset path. The document gives no implementation details, pricing results, or validation evidence, so the proposal is architectural guidance rather than a ready-to-use method. A custom implementation would need careful treatment of barrier monitoring and payoff logic.

Key ideas

  • QuantLib's cited engines do not natively combine basket payoffs with barrier features.
  • A custom Monte Carlo engine can be based on the European basket engine.
  • The path pricer must evaluate the barrier payoff along each simulated multi-asset path.
  • The engine's path-pricer factory must be changed to use the custom pricer.

Tags

Full text
# Price Barrier Options on Baskets using Quantlib


# Price Barrier Options on Baskets using Quantlib












Is it possible to price barrier options on a basket of stocks using Quantlib, e.g. a Worst-of Down-and-in-Put on a basket of 3 stocks?

I already checked the `MCBarrierEngine` (does not support multiple stocks) and the `MCEuropeanBasketEngine` (does not support barrier options), but without any luck.

## Answer by Luigi Ballabio (score 3, accepted)

https://quant.stackexchange.com/a/28318

There's no such engine at this time. If you want to code it, you can clone and rename the `MCEuropeanBasketEngine` and the `EuropeanMultiPathPricer` classes. The new path-pricer class must be modified so that its `operator()` returns the payoff of your option as calculated on a given path; the new engine will be mostly unmodified, except for the `pathPricer` method which of course must now return an instance of the new path-pricer class.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.