Hi Luigi. Probably it should not be an index (because it does not represent
one actually). Yes, you are right. It seemed practical though in some
circumstances, e.g. the FloatFloatSwap instrument takes an
InterestRateIndex and this can now be a cms spread index without any
changes there (I haven't commited this part of the development yet). It is
like in Murex where you have derived indices which can very generally set
up as a weighted basket of underlying indices. I did not want to go as far
here without any use case at the moment, but the concept is quite appealing
from my point of view. However I am also completely fine to change this as
you propose.


On 8 April 2014 18:04, 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 {
>
> Peter, just wondering: do you think this should be an Index? How about
> simply passing the two swap indexes to the coupon? (It would also sidestep
> the problem of native fixings that you had to tackle in the Index class.)
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/lballabio/quantlib/pull/88/files#r11397067>
> .
>