Quantlib 固定利率债券现金流

问题描述

我正在尝试为通用的 callalbe 债券定价,并根据 Excel 的价格函数验证该价格。

如果我使用 IssueDate/maturityDate 创建时间表,我可以复制 Excels 价格。 当我修改 Schedule 的构造以使用 new Schedule(issueDate,callDate,....,firstDate,nextToLastdate) 其中 firstDate 是 vanillaBond 的 firstCashflow,nextToLastDate 是 callDate 之前的 lastCashFlow。

在大多数情况下,所有的现金流看起来都是正确的,但在某些情况下,我发现最后的现金流不是调用日期。

特别是在使用时

    Date calldate = Date(01,January,2024);
    Date issueDate = Date(05,May,2017);
    Date maturityDate = Date(30,June,2024);
    Date settleDate = Date(21,April,2021);
    Date firstDate = Date(30,2017);
    Date nextToLastDate = Date(31,December,2023);
    Schedule cSchedule = Schedule(issueDate,calldate,Period(Semiannual),NullCalendar(),Following,DateGeneration::Backward,true,nextToLastDate);
    FixedrateBond callRateBond(
                 daysToSettle,faceAmount,cSchedule,std::vector<Rate>(1,0.07),Thirty360());

我的现金流持续到 2024 年 1 月 31 日。

另一方面,如果我不使用 firstDate/nextToLastDate 参数,我的 cleanPrice 会在 excel 中下沉,最后的现金流会落在 calldate,但是其他现金流都是 T+1,而不是我所期望的。

>

我是否设置了这个通用的可调用错误?还有什么我遗漏的吗。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)