Prices in EUR

hi, I have some tickers that I want to drag in EUR prices for;

TICKERS = ['4958.TW', '2899.HK', 'ZBH.N', 'ZI.OQ', '3092.T']

get_pricing_1 = ek.get_timeseries(TICKERS, fields='CLOSE',start_date='2023-09-28',end_date='2023-10-27')


Can I amend that to get EUR prices on each underlying? Thx

Best Answer

  • Hi @c.dass ,


    As much as I know ek.get_timeseries doesn't support currency conversion. However, you can use ek.get_data instead:

    TICKERS = ['4958.TW', '2899.HK', 'ZBH.N', 'ZI.OQ', '3092.T']

    get_pricing_1, err = ek.get_data(TICKERS, fields=['TR.Close', 'TR.Close.date'],parameters = {'Sdate': '2023-09-28', 'Edate':'2023-10-27', 'curn':'EUR'})
    get_pricing_1


    screenshot-2023-11-09-at-153929.png

    And if you want to tramsform the data into a similar format that ek.get_timeseries returns, you can use pivot:

    pivot_df = get_pricing_1.pivot(index='Date', columns='Instrument', values='Price Close')
    pivot_df



    screenshot-2023-11-09-at-154046.png

    Hope this helps.


    Best regards,

    Haykaz