How can we extract historic avg trading value or similar?

Hi there,

We are trying to extract historic avg trading volumes and or values, through the Python API – but seem to be unable to find the correct field for this. Can you help us?

  1. So far we have looked at TR.AvgDailyValTraded30D, and the related items in the date item browser – but those all seem to calculate from the latest date.
  • Ideally we would
    want something like AVGdailyVolume for the date 2003-01-31, 2003-02-30,
    2003-03-31 and so on. The closest we get is getting the daily volume on the
    exact calc date using TR.Volume, but we need the avgdailyvolume for a period.

Best Answer

  • m.bunkowski
    Answer ✓

    Hi @me39,

    You can try that using an AVG function.

    df, err = ek.get_data(['AAPL.O'], 
    ['AVG(TR.VOLUME)'],
    {'SDate': '2003-01-01', 'EDate': '2003-12-31'})
    df

    To check how to build that syntax and other capabilities, please check Build Formula tool in Eikon Excel.

    image

Answers