finmath / finmath-lib

Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.
Apache License 2.0
488 stars 168 forks source link

Non-vanilla Bermudan Swaption #78

Open summepau opened 4 years ago

summepau commented 4 years ago

Hi, How should I build a Bermudan Option on a general swap in the LMM? For example a swap paying CMS v Libor. The BermudanSwaption class assumes a Fixed/Libor swap.

Thanks

Paul

cfries commented 4 years ago

This can be done using the component in net.finmath.montecarlo.interestrate.products.components.Option and build the product from individual components. Easier is to just create your own product starting from BermudanSwaption and using an Index like net.finmath.montecarlo.interestrate.products.indices.ConstantMaturitySwaprate (this would be a minimal change to the BermudanSwaption class). Good suggestion, maybe I will add it.