Re: Index and Xibor

Posted by Luigi Ballabio-2 on
URL: http://quantlib.414.s1.nabble.com/Index-and-Xibor-tp3331p3332.html

On 2004.09.10 19:55, Daniele De Francesco wrote:

> We are trying to create a Floating cashflow that resets off an index
> which is not really a Xibor.
> The problem is that the IndexedCoupon class that we use for our
> floating cashflows takes a xibor as input and not a more generic  
> index.
> We would like to create our own strange subclass of Index, but we
> won't be able to use IndexedCoupons if we do that.
> We then thought that we could create our Index as a subclass of Xibor
> to get around the problem. But unfortunately xibor doesn't have  
> fixing() as a virtual method.

Daniele,
        fixing() is declared virtual in class Index from which Xibor  
inherits, therefore Xibor::fixing() is virtual too--even if it's not  
explicitly declared as such.  However, you're right: IndexedCoupon  
should take an Index. Go ahead and send me the patch.

Later,
        Luigi