From: Robert F. H. <rf...@st...> - 2004-11-03 15:42:23
|
I am interested in using the Black Scholes calculation on an option which comes due in the current month. By editing the example to hard-code the current month in the today, settlement, and exercise date fields I get the following error in blackvariancesurface.cpp:55: QuantLib::BlackVarianceSurface::BlackVarianceSurface(const QuantLib::Date&, const std::vector<QuantLib::Date, std::allocator<QuantLib::Date> >&, const std::vector<Time, std::allocator<Time> >&, const QuantLib::Matrix&, QuantLib::BlackVarianceSurface::Extrapolation, QuantLib::BlackVarianceSurface::Extrapolation, const QuantLib::DayCounter&): dates must be sorted unique! I get the same error even if I change this: dates[0] = settlementDate.plusMonths(1); to this: dates[0] = settlementDate; Is this just some documentation insufficiency or something missing in the interface? Can a Black Scholes calculation be done on this month, and if so, how? (Note: Is there any more comprehensive documentation on how to use this feature other than the example and the class description?) Thanks in advance. Robert Hoffman |