Day counters in Swaps
Posted by Bill Q on
URL: http://quantlib.414.s1.nabble.com/Day-counters-in-Swaps-tp2339.html
Hello Everyone
Working my way through the SimpleSwap example I became a little confused
with the floating side day counter.
On the fixed leg side of the swap the FixedRateCoupon has its own day
counter, which seems well and good. However on the floating leg side the
FloatingRateCoupon does not. It does however contain an Index which has a
day counter. But it doesn't use that. Instead it uses the day counter in the
term structure contained in the index.
inline DayCounter FloatingRateCoupon::dayCounter() const {
return index_->termStructure()->dayCounter();
}
Now the term structure uses its day counter during the bootstrap process
when it adds to the times_ vector, so it will have an effect on the term
structure.
And so to my question. Does the day counter on the floating side of a swap
always have to match the day counter used in the forecasting term structure?