How to get calendar days in get_data method?

I would like to be able to decide whether I want to collect working days or calendar days. It is possible to set in get_timeseries method, but not in get_data.

Tagged:

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @bohdan.vahalik

    I checked and found that the 'Frq' parameter in the get_data method supports Calendar Days.

    1651808183122.png

    You can use the Data Item Browser tool to verify which fields that support time-series data.

    The code looks like this:

    df, error = ek.get_data("IBM.N", ["TR.ClosePrice.Date","TR.ClosePrice"],
                          {'SDate':'2022-01-01', 'EDate':'2022-05-01','Frq':'C'})        

Answers

  • hi @bohdan.vahalik ,

    please let me add example codes below, if the parameters are set as "D" (Trading days), the output returns are the data of trading days only. However, using "C" (Calendar days), the output returns are the data from all calendar date in the period.

    1651827708643.png

    1651827780567.png