# QuantLib-Python: What is "index = Euribor1Y(term_structure)" doing?

I am currently reading thorugh the QuantLib-Python cookbook to learn about this nice pice of software. On page 141 I encountered a block of code that made me wonder what it is exactly doing.

The code looks as follows:

today = Date(15, February, 2002);
settlement = Date(19, February, 2002);  # four days because of the weekend
Settings.instance().evaluationDate = today;
term_structure = YieldTermStructureHandle(
FlatForward(settlement,0.04875825,Actual365Fixed())
)
index = Euribor1Y(term_structure)


First, there is a term structure element created. Indeed a very simple one with a flat forward curve.

But what is the last line doing? Is it simply creating an object (or function?) that could be used to compute 1Y-vs-fix swap rates that are in line with that term structure?

Could I find the definition of that "Euribor1Y" in the quantlib-python documentation?

The same thing could probably be done for "Euribor6M" and others. But where could I find a list of all available such functions?

Thank you very much!

Bernd

Euribor are Euro interebank interest rates (https://en.wikipedia.org/wiki/Euribor). They exist for various maturities (1Y, 6M, 3M, etc.).

It can be used in a FRA, interest rates swap, cap, etc.

The yield curve (or term structure object) passed in the constructor is the one that will be used to estimate the index's forward rates.

The Euribor classes derive from IborIndex, maybe having a look directly at the doc and the C++ code is the best option:

• Thank you for your answer! That makes the generation of forward rates simple, once I have a calibrated term structure. A good idea to design QuantLib that way. But could you also help with the other aspects: What exactly is the "index"-thing? Is it an object or function? What would happen if I change the term structure object after the index creation? Does the index change or stay as it is? It would also be important to know which indexes are available: Euribor1Y, Euribor6M, Euribor1M. Do you know if such a list is svailable somewhere? Commented Jun 3, 2018 at 8:05
• It is a class, the available ones are available in the class diagram in the doc I sent in my answer, if you click on given class you can see its children. For the question on the yield curve, why would you do that? Normally you would use a handle so that if the values in your yield curve, it is taken into account in the index. Commented Jun 3, 2018 at 9:56
• Thank you for your answer. In the "QuantLib reference" under "IborIndex Class Reference" you could open the "Inheritance Diagram" to see the children. Got it! Commented Jun 3, 2018 at 12:34
• The behaviour of the interest rate curve you describe makes sense. I just wanted to make sure it works this way and understand why it behaves this way. If I got you correctly, the index-object "knows" about all the changes in the underlying term-structure-object. You don't need to execute the last line again. And it does so because the term structure is put in as a "handle". Commented Jun 3, 2018 at 12:37
• Please refer to this answer. It explains what handles are for in QuantLib: stackoverflow.com/a/42907325/2699660 Commented Jun 3, 2018 at 18:05