get_timeseries throws if cannot get info for 1 ticker

{'fields': 'VOLUME;OPEN;CLOSE;HIGH;LOW', 'startDate': '2018-11-30T00:00:00', 'endDate': '2018-11-30T00:00:01', 'interval': 'daily', 'instruments': ['1ENYM9', '1ENYU9', '1ENYZ8', '1ENYZ9']} 

The function throws with the exception:

"Empty data passed with indices specified."

This comes from panda. It seems a check for empty data is missing in eikon module.

The problem is only 1 symbol (1ENYZ9) from the instrument list has no data. So if I pass 200 instruments to the function, I receive 0 results.

This looks like a bug. Could you confirm this?

Thanks,

Igor

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @igorg

    Yes, it throws an exception. It is a bug because If I set raw_output to True, it properly returns valid JSON data.

    df = ek.get_timeseries(rics=['1ENYM9', '1ENYU9', '1ENYZ8', '1ENYZ9'], 
    start_date='2018-11-30T00:00:00',
    end_date='2018-11-30T00:00:01',
    interval="daily",
    raw_output=True)
    df

    image

    However, the Python library is unable to parse this data.

    The workaround is setting raw_output to True to retrieve the raw JSON data instead of DataFrame.

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.