get_date_from_today not defined

image

I'm using get_timeseries to pull close prices for two RICs. I want to use a relative date (2 years ago) for example for the start date using get_date_from_today. It's saying it's not defined. What should I be defining this as?

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    Add the following line to your imports before calling get_date_from_today function

    from eikon.tools import get_date_from_today

    Alternatively call the function without additional imports, but with fully qualified modules

    ek.tools.get_date_from_today(100)

Answers