-1

Quantlib has 2 methods as below: virtual Rate forecastFixing(const Date& fixingDate) const = 0; Rate pastFixing(const Date& fixingDate) const;

Am I right in saying :

  1. forecastingFixing() method rely on yield curve constructed to get the rate? and
  2. pastFixing() simply reads rate without help of any yield curve?

1 Answers1

0

That's correct. pastFixing relies on stored fixings, that you can save through the addFixing or addFixings method of the corresponding index; for instance,

Euribor6M index;
index.addFixing(Date(20,October,2010), 0.02);

will store a 2% fixing for the 6-months Euribor that will be accessible from all instances of the class. As you say, forecastFixing will forecast the rate on a given curve instead.

Usually, though, you won't be calling either of those directly. You can call the fixing method; it will detect whether or not the date you requested is in the past and it will dispatch to the correct method.

Luigi Ballabio
  • 4,128
  • 21
  • 29