Bootstrap ZeroCurve 只有一个 div 前日期和一个 div 金额

Bootstrap ZeroCurve with only one ex-div date and one div amount

这可能是一个非常愚蠢的问题,但不确定该怎么做。我有一个函数 returns all ex div dates 和 divYield 相应 evalDate to expiration 选项的日期。

Handle<YieldTermStructure> dividendTermStructure(bootstrapDividendCurveDB("INTC", today, expiration, underlyingPrice));

boost::shared_ptr<ZeroCurve> 
bootstrapDividendCurveDB()
{
....
    return boost::shared_ptr<ZeroCurve>(new ZeroCurve(ddy.exDivDates, ddy.dividendYields, ActualActual(), calendar));
}

然后将其传递给

//instantiate BSM process
    Handle<Quote> underlyingH(boost::shared_ptr<Quote>(new SimpleQuote(underlyingPrice)));
    boost::shared_ptr<BlackScholesMertonProcess> bsmProcess(new BlackScholesMertonProcess(underlyingH, 
        dividendTermStructure, yieldTermStructure, volatilityTermStructure));

但是,如果在evalDateexpiration之间只有一个dividend,那么ddy.exDivDatesddy.dividendYields各只包含一个entry ,我得到一个错误:

unknown location(0): fatal error: in "testAmericanOptionPricingWithDividends": QuantLib::Error: not enough input dates given
FD_Div_IRAmerican.cpp(524): last checkpoint: "testAmericanOptionPricingWithDividends" entry.

我从中获得这部分代码的示例解决此问题的方法是采用先前的 dividend yield,即使 evalDate(今天)已超过前 div 日期。这样至少有两个值,从中有足够的点来构建 ZeroCurve.

这似乎不正确。在这种情况下,对于在到期和 "today" 之间可能只有一个 dividend 的短期期权怎么办?

在这种情况下,根据您拥有的单个值使用平坦曲线可能是有意义的。您的工厂函数将类似于:

boost::shared_ptr<YieldTermStructure> 
bootstrapDividendCurveDB()
{
...
if (just one dividend)
    return boost::make_shared<FlatForward>(evalDate, single_dividend,
                                           ActualActual());
else
    return boost::make_shared<ZeroCurve>(ddy.exDivDates, ddy.dividendYields,
                                         ActualActual(), calendar));
}

注意:如果您按上述方式构建它,ZeroCurve 的参考日期将是 exDivDate 向量中的第一个日期,而不是评估日期。如果这不是您想要的,则必须在日期向量前面添加评估日期,并在比率向量前面添加另一个股息(可能是第一个股息的副本)。