Refinitiv call get_data() returning Price instead of yield

Hi,

I have this piece of code:

data = ek.get_timeseries(
['GB10YT=RR','GBIL0E31='],
start_date="2021-09-01",
end_date="2021-09-08",
interval="daily"
)


As you can see below, I get the Cash bnd yields (OHLC) - but for the inflation bond, I get the prices (and not the yields).

How can I fix this?

Thanks,

Sumit

Tagged:

Best Answer

  • Hi @sumit


    Please use 'get_data' and the Data Item Browser as per this video to select the fields of interest. E.g.:

    data, err = ek.get_data(
    instruments=['GB10YT=RR','GBIL0E31='],
    fields=['TR.ASKPRICE.date',
    'TR.CLEANPRICE', 'TR.BIDYIELD',
    'TR.ASKPRICE', 'TR.ASKYIELD',
    'TR.MIDPRICE', 'TR.MIDYIELD',
    'TR.HIGHPRICE', 'TR.HIGHYIELD',
    'TR.LOWPRICE', 'TR.LOWYIELD',
    'TR.OPENPRICE', 'TR.OPENYIELD',
    'TR.OPENASKPRICE', 'TR.HIGHASKPRICE',
    'TR.DIRTYPRICE'],
    parameters={
    'SDate': '2021-09-01',
    'EDate': '2021-09-08',
    'Frq': 'D'})

    This example comes - in part - from this article and its source code on GitHub.

Answers