How do I download ADJUSTED OHLC data for SP500 names daily using EIKON API with python?

I need to download adjusted OHLC prices daily. Should include all corporate actions including cash dividends, splits, mergers etc

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    In line with industry standard Refinitiv does not adjust stock price history for cash dividends in most markets. You can use get_timeseries method with fields 'OPEN','HIGH','LOW','CLOSE':

    ek.get_timeseries(['TRI.N'],['OPEN','HIGH','LOW','CLOSE'])

    Or you can use get_data method with fields 'TR.PriceOpen', 'TR.PriceHigh', 'TR.PriceLow', 'TR.PriceClose', e.g.

    ek.get_data('TRI.N',
                ['TR.PriceClose.date','TR.PriceOpen','TR.PriceHigh',
                 'TR.PriceLow','TR.PriceClose'],
                {'SDate':'-1M','EDate':'0D'})

    For more details see the documentation for Eikon Data APIs. In particular I suggest you check out this tutorial, that talks at length about metadata discovery (finding field names and parameters) for use with Eikon Data APIs.

Answers