2
$\begingroup$

I am looking for the TOIS, TONAR, AONIA in Quantlib for discounting. I only could find the EOINA, FEDFUNDS, SONIA etc.Do I miss something? In case they don't exist how can I use the corresponding rate helpers in quantlib (python).

$\endgroup$
2
$\begingroup$

Not all overnight indexes were given a specific class.

As a workaround, you can create an instance of the OvernightIndex class and pass it the relevant parameters (fixing calendar, day counter etc.). E.g., if there wasn't an EONIA class already, you could build an instance of it as:

index = OvernightIndex("EONIA", 0, EURCurrency(),
                       TARGET(), Actual360(), curve_handle)

where the parameters are a name for the index, the number of settlement days, the currency, the fixing calendar, the day counter, and a handle to the curve used to forecast the fixings.

If you find yourself doing this often, and if you can write some C++, you might also consider writing a specific class (like EONIA and the like) and possibly contribute it to QuantLib. You can compare the code above with the contents of ql/indexes/ibor/eonia.hpp and ql/indexes/ibor/eonia.cpp to see how that can be done.

$\endgroup$
  • $\begingroup$ thanks a lot. do you have an example for the workaround? I will take then a look whether I can contribute for other ones :). $\endgroup$ – JonDoe Nov 12 '17 at 10:53
  • $\begingroup$ I edited the answer and added the example. $\endgroup$ – Luigi Ballabio Nov 13 '17 at 9:07
  • $\begingroup$ Thanks a lot for the help. That is what I was looking for $\endgroup$ – JonDoe Nov 15 '17 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.