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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 3

Nan values in python while in excel works well

Hello everyone. We're having problems passing some Excel formulas to the data API in python, specifically getting FXRates data, we are receiving “nan” instead of the values but only in one FXRates (we pull out six of them frequently). We are using the same formula for all the FXRates (ek.get_timeseries([RIC],start_date='2019-02-05' ,end_date='2019-02-05') but when try the RIC for USD/JPN 1M (USDJPY1MFIXM=WM) we are getting “nan” values. This RIC code works very well in Excel using this formula (

=RHistory(USDJPY1MFIXM=WM,NDA_RAW.Nda_date;NDA_RAW.Nda_mid,START:05-Feb-2019 END:05-Feb-2019 INTERVAL:1D,,,2/5/2019).

Any ideas why the formula in python is not working?

Thanks

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonexcel
icon clock
10 |1500

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

Upvotes
Accepted
39.2k 75 11 27

@bruno.fournies
I have reproduced the issue you described and opened service case 07337685 with Refinitiv Helpdesk on your behalf to investigate the problem.
The Helpdesk will keep you informed on the progress.
In the meantime, if you only need the most recent fixing, as a workaround I can suggest you to get it using

ek.get_data('USDJPY1MFIXM=WM',['CF_DATE','CF_LAST'])
icon clock
10 |1500

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

Upvotes
3 0 0 3

Thanks for your answer Alex,

The formula you gave me works , should I use it for the others Fxrates or its better to continues using the ek.get_timeseries if its working?.

icon clock
10 |1500

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

The difference between get_timeseries and get_data example I provided is that the latter only returns the latest value whereas the former can return timeseries of price history. If all you need is the latest value, it's best to use get_data for all RICs.

perfect, so I will use the get _data for daily basis. Thanks for your help Alex!

Click below to post an Idea Post Idea