简体   繁体   中英

How to use swap rate helper in QuantLib to build yield curve with fixing days for the floating leg

I want to use the swap rate helper to build yield curve. The product may consist of a fixed leg and a floating leg. For the floating leg, we need to fix the float rate one day before the accrual start date. But when I use the swap rate helper, I have seen that it uses the MakeVanillaSwap and then VanillaSwap classes, where I cannot define the fixing days for the floating leg. But in the iborLeg, we can choose a fixing day for the product, and the default will be the fixing day of the iborIndex. So how can I solve this problem and can I still use the swap rate helper to build the yield curve? Or have I misunderstood any part of the code?

The parameter of the leg constructor doesn't get all the way up to the helper, so you're right, you can't pass it there.

I think you can work around this by building and passing to the helper an IborIndex instance with the same conventions as the one you want to use, but with one fixing day instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM