Gap in FX data via Eikon API

When I run this query:

df, err = ek.get_data(["EUR=", "USD="],["TR.FxRateComposite.date","TR.FxRateComposite"], {'SDate':'2000-01-01', 'EDate':'2020-12-01'})

I notice that there are roughly two years (approx. 2015-2016) of FX data that seems to be wrong. Picture attached. I've tried this with 10+ currencies with the same result. Does anyone know why this is the case?image

Best Answer

  • Thank you @zoya.farberov for the tip. The gap is not present if I don't request "USD" since the query returns less than 10k data points. Thank you for your help!

Answers

  • I'm afraid I'm not reproducing this on my end. On my end

    df, err = ek.get_data(["EUR="],
                          ["TR.FxRateComposite.date","TR.FxRateComposite"], 
                          {'SDate':'2000-01-01', 'EDate':'2020-12-01'})
    df.plot.line(y='FX Rate Last')

    produces

    image

    One thing I notice is that the number of rows in the dataframe you plot is >8K, whereas the dataframe returned by my code above contains <8K rows. Could you check how you get the rows corresponding to the flat line in your plot? Are they returned by get_data method? If yes, would you mind including the exact get_data call that returns the dataframe with suspect data and export the values in the dataframe to a CSV file, zip it and attach it to your post?

  • Hello @christoph.b,

    I do not reproduce this on my side.

    I can think of two possible causes, one is you may be hitting around 10K datapoints limit. See Eikon Data API Usage and Limits Guideline for more detailed info on this.

    Suggest removing USD=, it does not seem to yield value, as is always 1.0

    image

    See if this helps.

    The other, something may be off with charting, I do not see dates, try this:

    image

    See if it helps?