Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Volume becomes N/A when you adjust the end date.

Replicated the code and notice that the issue is replicable:

The Last day becomes N/A for March 29, 2004, when we adjust the end date to March 30,2004 then the 29 has value and the N/A moves to the day 30.

Here is the code try changing the End date into march 29, 2004 then 30 and then 31


import refinitiv.data as rd

rd.open_session()
df = rd.get_data(

universe = ['AAPL.O'],

fields = ['TR.CLOSEPrice', 'TR.LOWPrice', 'TR.CLOSEPRICE.DATE', 'TR.Volume.Date', 'TR.VOLUME', 'TR.NUMBERBLOCKTRADES', 'TR.TSVWAP'],
parameters = {'SDate': '2004-03-25', 'Edate': '2004-03-31'}

)

display(df)

workspace-data-apirdp-api#contentpython api
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

· Write an Answer
Upvote
Accepted
83.1k 281 53 77

@marceugene.belen

Thank you for reaching out to us.

I checked the data in Workspace Excel and found that it doesn't return the TR.Volume on 2004-03-29.

1718077143128.png

The output is similar to RD library.

1718077542642.png

The TR.ClosePrice and TR.Volume fields are in different categories. The TR.ClosePrice field is in the Time Series category while the TR.Volume field is in the Price and Volume History category.

You may try to use the TR.AccumulatedVolume field which is in the Time Series category.

df = rd.get_data(
    universe = ['AAPL.O'],
    fields = ['TR.CLOSEPrice', 'TR.LOWPrice', 'TR.CLOSEPRICE.DATE', 'TR.AccumulatedVolume.Date', 'TR.AccumulatedVolume', 'TR.NUMBERBLOCKTRADES', 'TR.TSVWAP'],
    parameters = {'SDate': '2004-03-25', 'Edate': '2004-03-31'}
)


df

You can check the available fields and categories via the Data Item Browser tool or Formula Builder in Workspace Excel.


1718077143128.png (52.3 KiB)
1718077542642.png (16.7 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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