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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 4

Time Series of Analytics / Python

Hi Everyone I am using the python function ek.get_data to source the field TR.AccruedAmountAnalytics. However, I can only source the accrued amount for one valuation date. Is there a possibility to source multiply valuation dates beside creating a loop? Thanks Jurij
eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvotes
Accepted
6.7k 8 6 7

@jurij.reichenecker yes so this field takes a number of parameters - ValuationDate and SettlementDate, amongst others (you can see all of these in the Parameters section of the Data Item Browser app (type DIB into eikon search bar).

ValD = ['2021-02-03','2021-02-04','2021-02-05']
data1 = pd.DataFrame()

for d in ValD:

    df,err = ek.get_data('34540TKR2', ['TR.AccruedAmountAnalytics'],
                        parameters={"ValuationDate": d, "SettlementDate": d})
    df['Date'] = d
    if len(df):
        data1 = pd.concat([df, data1], axis=0)
    else:
        data1 = df
            
data1

Is this the kind of thing you were looking for? Obviously you can adjust the parameters as you like. I hope this can help.


1612796732218.png (26.5 KiB)
icon clock
10 |1500

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

Upvote
13k 32 12 18

Hi @jurij.reichenecker,

The Data Item Browser shows that TR.AccruedAmountAnalytics is not a series field, so you won't be able to request it with a date range. Using a loop, seems to be the only plausible option.

icon clock
10 |1500

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

Click below to post an Idea Post Idea