Getting expiration dates for futures on Exchange-Traded Rates given RIC

ns3481
ns3481 Newcomer

Hi Team,

I have been trying to get expiration dates for Eurodollar futures, US federal funds rate futures, US Treasury Futures.

1. For Eurodollar Futures (Eg RIC: EDH0, EDZ9, etc..)
2. For Fed Funds Futures (Eg RIC: FFH0, FFZ9, etc..)
3. For US Treasury Notes Futures (Eg RIC: TYZ8, TUH3 etc..)
4. For US Treasury Bond Futures (Eg RIC: USH5, etc..)

Problem: I get the tickhistory using RIC, but Dec 1999, Dec 2009, Dec 2019 futures share the same RIC which for Eurodollars will be EDZ9 (Z for december) so I get a single file with continuous data. I want to know the expiration date for Dec 1999, Dec 2009 futures, for instance... (in total I have 300+ RIC codes) These all belong to Exchange-Traded Rates category.

I have access to: RTH
I'm using python, so will prefer a solution that works using python.

What I tried so far:
1. Lookup here: https://developers.refinitiv.com/en/tools-catalog/ric-search, but it only has info for currently active instruments, I need it for historic instruments too
2. Solution to my previous query by @Jirapongse here:(https://community.developers.refinitiv.com/questions/95314/getting-information-for-ric-code-of-an-option-via.html) works for equity options but not for interest rate futures.
3. Used http://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Search.FuturesAndOptionsSearchRequest, which seems to work for SPX futures, but not for the futures I need information on.


Thanks!

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @ns3481

    You can try the HistoricalReferenceExtractionRequest extraction. This extraction contains the following content fields.

     {
                "Code": "HRD.ETH Expiry Date",
                "Name": "ETH Expiry Date",
                "Description": "Instrument's Expiry Date.",
                "FormatType": "Text",
                "FieldGroup": " "
            },
    ...
     {
                "Code": "HRD.Expiration Date",
                "Name": "Expiration Date",
                "Description": "Date on which a futures or an options contract automatically expires. This field contains values previously found under Maturity Date.",
                "FormatType": "Date",
                "FieldGroup": " "
            },

    The request message looks like this:

    {
        "ExtractionRequest": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.HistoricalReferenceExtractionRequest",
            "ContentFieldNames": [
               "RIC", "Expiration Date","ETH Expiry Date"
            ],
            "IdentifierList": {
                "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
                "InstrumentIdentifiers": [
                    { "Identifier": "EDZ9", "IdentifierType": "Ric" }
                ],
                "ValidationOptions": {"AllowHistoricalInstruments": true},
                "UseUserPreferencesForValidationOptions": false
            },
            "Condition": {
                "ReportDateRangeType": "Range",
                "QueryStartDate": "1990-05-01",
                "QueryEndDate": "2020-05-31"
            }
        }
    }

    The output is:

    ...
     "Contents": [
            {
                "IdentifierType": "Ric",
                "Identifier": "EDZ9",
                "RIC": "EDZ9",
                "Expiration Date": null,
                "ETH Expiry Date": "1999-12-13"
            },
            {
                "IdentifierType": "Ric",
                "Identifier": "EDZ9",
                "RIC": "EDZ9",
                "Expiration Date": null,
                "ETH Expiry Date": "2009-12-14"
            },
            {
                "IdentifierType": "Ric",
                "Identifier": "EDZ9",
                "RIC": "EDZ9",
                "Expiration Date": "2009-12-14",
                "ETH Expiry Date": "2009-12-14"
            },
            {
    ...

    For more information, please refer the REST API Tutorial 10: On Demand Historical Reference extraction tutorial on the Refintiiv Developer website.

Answers