/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2002, 2003 Decillion Pty(Ltd) This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email . The license is also available online at . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ /*! \file compoundforward.hpp \brief compounded forward term structure */ #ifndef quantlib_compoundforward_curve_hpp #define quantlib_compoundforward_curve_hpp #include #include namespace QuantLib { //! compound-forward structure /*! \test - the correctness of the curve is tested by reproducing the input data. - the correctness of the curve is tested by checking the consistency between returned rates and swaps priced on the curve. \bug swap rates are not reproduced exactly when using indexed coupons. Apparently, some assumption about the swap fixings is hard-coded into the bootstrapping algorithm. */ class CompoundForward : public ForwardRateStructure { public: // constructor CompoundForward(const Date& referenceDate, const std::vector& dates, const std::vector& forwards, const Calendar& calendar, const BusinessDayConvention conv, const Integer compounding, const DayCounter& dayCounter); BusinessDayConvention businessDayConvention() const { return conv_; } Integer compounding() const { return compounding_; } Date maxDate() const; const std::vector