Using Python api to get adjusted price of multiple stocks

Hi,

I am trying to retrieve data from Eikon using Python api

my code is :

data, error=ek.get_data(x, ['TR.PriceClose.Date', 'TR.PriceClose'], parameters={"Adjusted":"1",'SDate':sDate, 'EDate':eDate,"Frq":"D", "curn":"USD"})

table = pd.pivot_table(data, index='Date', columns='Instrument',values='Price Close')

/

After this, I got the full history prices of different stocks. But I compared this table to Yahoo finance 's adjusted price and it seems like Eikon is giving me 'unadjusted price' only.

Could you help me with this? I don't know what have gone wrong :(

Best Answer

  • @brunchpotatoes
    "Adjusted":"1" is not a valid parameter for TR.PriceClose field. This said TR.PriceClose field always returns adjusted stock prices. However what capital events are considered for stock price history adjustment differs by market. As @claudiu mentioned for most markets regular cash dividends are excluded from stock price adjustment, which is the methodology most prevalent in market data industry and followed by most market data sources (exchanges) and aggregators like Thomson Reuters. For a bit more color on the subject see this thread.

Answers

  • afaik Eikon does not provide dividend adjusted prices. The only adjustment done is for splits. I have an old request to add support for dividend adjustments, no luck so far....