yes, true. Can I try to introduce the more general notion of a "derived
index" though (from which the cms spread index would then inherit),
hopefully cleaner ? Then, if you still don't like it I'll revert the whole
thing back to the two index solution.


On 9 April 2014 16:23, Ferdinando M. Ametrano <notifications@github.com>wrote:

> In QuantLib/ql/experimental/coupons/swapspreadindex.hpp:
>
> > + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
> > + or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */
> > +
> > +/*! \file swapspreadindex.hpp
> > +    \brief swap-rate spread indexes
> > +*/
> > +
> > +#ifndef quantlib_swapspreadindex_hpp
> > +#define quantlib_swapspreadindex_hpp
> > +
> > +#include <ql/indexes/swapindex.hpp>
> > +
> > +namespace QuantLib {
> > +
> > +    //! class for swap-rate spread indexes
> > +    class SwapSpreadIndex : public virtual InterestRateIndex {
>
> for what is worth I also agree that a coupon with two indexes is better.
> there are no official (ISDA) fixings of the spread as far as I know, so
> this suggests to avoid creating a non-existent index
> … <#14546df6528f5d57_>
> On Wed, Apr 9, 2014 at 1:41 PM, Luigi Ballabio <notifications@github.com>wrote:
> In QuantLib/ql/experimental/coupons/swapspreadindex.hpp: > + WITHOUT ANY
> WARRANTY; without even the implied warranty of MERCHANTABILITY > + or
> FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ > +
> > +/*! \file swapspreadindex.hpp > + \brief swap-rate spread indexes > +*/
> > + > +#ifndef quantlib_swapspreadindex_hpp > +#define
> quantlib_swapspreadindex_hpp > + > +#include <ql/indexes/swapindex.hpp> > +
> > +namespace QuantLib { > + > + //! class for swap-rate spread indexes > +
> class SwapSpreadIndex : public virtual InterestRateIndex { I see. Yes, the
> concept is appealing. I'd wait for a use case to modify Index, though, so
> I'd go for the two swap indexes at this time. What do you think? -- Reply
> to this email directly or view it on GitHub<
> https://github.com/lballabio/quantlib/pull/88/files#r11431644> .
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/lballabio/quantlib/pull/88/files#r11437655>
> .
>