On 2004.07.23 15:31,
[hidden email] wrote:
> I am trying to price LIBOR forwards (e.g 3 months forward 3 months, 6
> months forward 23 days, etc) using the PiecewiseFlatForward function,
> but when I ask for spot rates, I obtain different rates than those
> that I have specified myself.
Dieudonné,
if you use the TermStructure::forward() method, the returned
values are continuously compounded forward rates, which is not what you
want. In order to obtain LIBOR fixings, you must instantiate a Libor
index and use the fixing() method. For instance:
RelinkableHandle<TermStructure> discountCurve(
Handle<TermStructure>(
new PiecewiseFlatForward(...)));
Euribor index(6,Months,discountCurve);
std::cout << index.fixing(Date(23,July,2006)) << std::endl;
For details, look at test-suite/piecewiseflatforward.cpp--which
actually verifies that the discount curve reproduces the given rates
exactly...
Later,
Luigi