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$

1 Answer 1

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$
3
  • $\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, 2017 at 10:53
  • $\begingroup$ I edited the answer and added the example. $\endgroup$ Nov 13, 2017 at 9:07
  • $\begingroup$ Thanks a lot for the help. That is what I was looking for $\endgroup$
    – JonDoe
    Nov 15, 2017 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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