Peter,

I'll leave the final decision to Luigi, but considering you impressive
track record I am afraid I might be losing something here.

Why do you think "derived index" might be better?

In my book an index is something that has a public fixing from some
recognized institution, as such a cms-spread is not an index.

In a term sheet you always state the spread as difference between two real
indexes, you do not refer to the 2Y/10Y-spread

ciao -- Nando




On Wed, Apr 9, 2014 at 6:52 PM, Peter Caspers <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 {
>
> 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.
> ... <#1454767706537443_>
> 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> .
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/lballabio/quantlib/pull/88/files#r11445484>
> .
>