getting Datastream data code 553E

Quek
Quek Newcomer

I am trying to get timeseries data from Datastream code 553E. I was able to get it from Excel using the the Refinitiv Datastream Excel plugin, but was unable to get the same data using the Datastream python API (using the same code 553E). What is the correct format of the ds.get_data() command to get data code 553E for ticker INTC.O?

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Quek

    Thanks for reaching out to us.

    I checked and found that the data type 553E represents "12M Forward Price/Book". To use the Datastream with RICs, you need to enclose a RIC with angle brackets <>.

    I tried the code below and it works fine.

    df = ds.get_data(tickers='<INTC.O>,<IBM.N>',
    fields=['553E'],
    kind=0)
    df

    The output is:

    1678323992206.png


    I hope that this information is of help.

Answers

  • Quek
    Quek Newcomer

    How do I download the time series for 553E? The answer allows me to download only the current value of 553E. Using the Excel Datastream plugin, I am able to download the time series, for example from 2023-01-02 to 2023-03-08. However, I am unable to do the same if i were to use the Python API. Can you please help?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Quek

    Please try this code.

    df = ds.get_data(tickers='553E(<INTC.O>)',
                     kind=1,start='-2Y',end='0D',freq='D')
    df

    The output is:

    1678338333592.png