Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
25 2 3 4

TR.CLOSEPRICE currency conversion does not work

Hello,


I am looking to pull historical prices for a large number of ISINs across different asset classes. I am using the following formula:

df2, err=ek.get_data("ANN4327C1220",["TR.CLOSEPRICE(Adjusted=1).date","TR.CLOSEPRICE(Adjusted=1).value", TR.CLOSEPRICE(Adjusted=1).date.currency
                                       ],
                                {"SDate":"2015-12-31","EDate":"2022-12-31","Frq":"M","curn":"DKK"})


Unfortunately, the currency conversion does not work for some ISINs, including the one in the example. The currency column of df2 in the example is notably empty. Is it possible to solve this issue? If not, how can I obtain the currency of the item "TR.CLOSEPRICE" for a series of ISIN please?


Thank you.


Best,

David

eikon-data-api#contentprice-history
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@dpi.eco

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@dpi.eco

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
5k 16 2 7

Hi @dpi.eco ,


Thank you for your question. I have tested you code and the currency conversion works when I use the RIC for the instrument. Please see below:

df2, err=ek.get_data("HDUGF.PK",
                     ["TR.ISIN", "TR.CLOSEPRICE.date","TR.CLOSEPRICE.value", "TR.CLOSEPRICE.currency"],
                                {"SDate":"2015-12-31","EDate":"2022-12-31","Frq":"M", "Curn":"DKK"})
df2

screenshot-2023-04-17-at-142915.png


Hope this helps and please let me know should you have any further questions.


Best regards,

Haykaz


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dear Haykaz,


Thank you for your reply. I tried your answer and the currency conversion indeed works. However, if I search for TR.RIC using the ISIN in my example, I get HUDN.AS^J22 and not HDUGF.PK. The two RIC give slightly different price series. Is it possible to search for the Currency of the price of the original ISIN?


Thank you.


Best,

David


Hi @dpi.eco ,


The one with ^ symbols are delisted ones, so you would need the HDUGF.PK.

Actually, what I would advise is to use our latest RD Libraries for Python. As a first step you may a symbol conversion which will return the RIC you are after:

from refinitiv.data.content import symbol_conversion
response = symbol_conversion.Definition(
    symbols= 'ANN4327C1220',
        from_symbol_type="ISIN",
    to_symbol_types="RIC"
).get_data()

response.data.df

screenshot-2023-04-17-at-150520.png

And then you can use the same code as before but using the RD Lib:

rd.get_data(
    universe=['HDUGF.PK'],
    fields= ["TR.ISIN", "TR.CLOSEPRICE.date","TR.CLOSEPRICE.value", "TR.CLOSEPRICE.currency"],
    parameters = {"SDate":"2015-12-31","EDate":"2022-12-31","Frq":"M", "Curn":"DKK"})


Hope this helps.


P.S I checked with ISIN in RD as well but unfortunately it didn't work there either.

Best regards,

Haykaz

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.