2016-09-30 53 views
1

当我使用Quantlib对香草利率掉期进行定价时,每个现金流量的支付日期总是与应计期间结束日期相同。下面是我通常使用建立一个香草交换方式:C++ Quantlib交换支付日期

Schedule fixedSchedule(previousResetDate, maturity, 6 * Months, NullCalendar(), ModifiedFollowing, ModifiedFollowing, DateGeneration::Backward, false); 
Schedule floatSchedule(previousResetDate, maturity, 3 * Months, NullCalendar(), ModifiedFollowing, ModifiedFollowing, DateGeneration::Backward, false); 
VanillaSwap swap(VanillaSwap::Receiver, nominal, fixedSchedule, fixedRate, Thirty360(), floatSchedule, libor, spread, Actual360()); 

在实践中,也有一些掉期可能从发生当期结束日期不同的付款日期。例如,在应计结束日期后2天,然后应用营业日常规调整。我只是想知道是否可以在Quantlib中以这种方式设置付款日期?

非常感谢。

回答

1

没有,在这个时候有没有办法得到你想要的行为。我想这需要将相关代码添加到FixedRateLegIborLeg类中,因为这是计划拆分和优惠券创建的地方。

0

您可以随时给自己的付款日期,如:

Schedule(std::vector<Date> { Date(1, Jan, 2016 }, Date(1, Jan, 2017 } }); 

,做是构造:

Schedule(const std::vector<Date>&, 
      const Calendar& calendar = NullCalendar(), 
      const BusinessDayConvention 
           convention = Unadjusted, 
      boost::optional<BusinessDayConvention> 
       terminationDateConvention = boost::none, 
      const boost::optional<Period> tenor = boost::none, 
      boost::optional<DateGeneration::Rule> rule = boost::none, 
      boost::optional<bool> endOfMonth = boost::none, 
      const std::vector<bool>& isRegular = std::vector<bool>(0)); 
+0

感谢您的解决。我通过将付款日期向量传递给Schedule来尝试此构造函数。但是,似乎Quantlib只是使用这个向量作为现金流量日期以及应计开始和结束日期。因此,问题没有解决。有什么办法可以将应计结束日期和付款日期分开,比如说2个工作日? – Ben10