question

Upvotes
Accepted
9 1 0 4

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

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!

tick-history-rest-apipython apifuturesric
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
49.3k 123 44 61

@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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Jirapongse , thanks. This was helpful. It works, but I have a problem, and I'm not sure if you can help with this. I get multiple expiration dates for the same contract. For EDH0, I'd have expected two (one each for March 2010, and 2020), but for March 2010, I get 2 dates( March 11 and March 15) which seems suspicious. Is this something you can please help with or do I have to reach out to the data team?


ssdamn.png

ssdamn.png (24.0 KiB)
Upvotes
9 1 0 4

I am wondering if you have any solution to the above comment. Is there an alternative way to pin down the correct expiration date for each contract?

@Jirapongse @zoya faberov tagging you because you guys have been super helpful in the past. Thanks!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
29.9k 34 11 17

Hello @ns3481 ,

HistoricalReference request, as suggested by my colleague @Jirapongse, is the most comprehensive and in-depth reference information, that is available.

To examine the possible alternatives, if you are looking to review all the Tick History requests that convey Expiration Date or related fields, see Data Dictionary - Refinitiv Tick History Custom Reporting.

Additionally, as a customer, you can engage with Refintiv content experts directly via Refinitiv Helpdesk Online -> Content -> RTH and have a content expert suggest the best request for your requirements.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.