For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 1 1

Pulling up timeseries data and creating mathematical equation from the output

Hi Team,

We have a client who's looking to pull up timeseries for TR.Liquidity10DAmt , however, we do not have a parameter to directly retrieve this data. I can attach a sample calculation of this data item and requesting for your assistance in providing a sample code that client can use.


liq-10d.png


Thank you


eikon-data-apitimeseries
liq-10d.png (90.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
58.8k 162 45 65

@chrisma.salut

The code could look like htis:

df = ek.get_timeseries("ADML.L",start_date='2021-11-05',end_date='2022-03-19')
df["LiquidityAmt"] = df["VOLUME"]*(df["CLOSE"]/abs((df["CLOSE"]/df["OPEN"]-1)*100))
df['Liquidity10DAmt'] = df["LiquidityAmt"].rolling(window=10, min_periods=1).mean()
df

The output is:

1648029201843.png


1648029201843.png (41.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.