question

Upvotes
Accepted
1 1 1 1

How to find the maximum daily bid ask spread (for example for Apple)

Hey guys,


I am completely new in Refinitiv Eikon and I really need your support.

Thank your very much!




eikoneikon-data-apidata
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.

Upvotes
Accepted
32.2k 40 11 19

Hello @s0568725 ,

If your interest is in how to find the correct field names to request in Datastream ( i.e. 'P', 'PA', 'PB', etc, you may wish to review the detailed documentation on the available Datastream content at http://product.datastream.com/DswsClient/Docs/ and select option 'DATA TYPES', you will be able to browse and search the list of fields that are available and select per your requirements.

To get started with Datastream, in Python, the quickest way should be DSWS Python Tutorial , otherwise, select from the available tutorials in the same section.

Per your requirement, you can request similar to the below via Datastream:

import DatastreamDSWS as DSWS
ds = DSWS.Datastream(username =USERNAME, password=PASSWORD)

df = ds.get_data(tickers='@AAPL', fields=('PA','PB'), start='-10D', end='-0D', freq='D
df

aapl.gif

and next you can arrive at your requirement, for example, for max SPREAD in the result set:

df = df.droplevel('Currency', axis=1).droplevel('Instrument', axis=1)

df['SPREAD'] = df['PA'] - df['PB']

df[df['SPREAD'] == df['SPREAD'].max()]

Resulting in:

maxspread.gif

As you probably are looking for a different date range, a different or additional calculation based on Datastream content, you can obtain use the same approach to arrive at your exact requirement.

I hope this information helps


aapl.gif (14.1 KiB)
maxspread.gif (4.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.

Upvotes
884 4 2 8

Hi @s0568725 ,

Can you tell me more whether you are using Refinitiv/Eikon Workspace or trying to get data using Eikon 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.

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.