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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 1 3

How to get price & fundamental data for members of constituent lists into R?

hi Refinitiv-team, I want to download price and fundamental data for all single stocks in a specific country. My aim is to cover all historically available stocks (so that there is no survivorship bias in the data). For example for Australia I want to use the lists WSCOPEAU, FAUS, DEADAU (cp. Schmidt et al (2019)*), but I cannot access these using the Eikon api (which establishes a connection to R). My questions are: 1. Are there more complete lists available in order to cover all stocks (active, dead, delisted etc.) within a country than the one I proposed? 2. What is the best way to get this data into R? I can only use the Eikon API but do not have access to DSWS. 3. I want the time-series fields "P", "PA", "RI", "PTBV", "NOSH", "DPS", "EPS", "VO" and static fields "MNEM", "DSCD", "TYPE", "RIC". Is my only option to Create a Request Table in Excel and then load the data into R? Many thanks for your help


*Schmidt, Peter S., et al. "Common risk factors in international stock markets." Financial Markets and Portfolio Management 33.3 (2019): 213-241.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonequitiesconstituents
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
39.3k 76 11 27

@Stefan.Vincenz

To add to the response by @jonathan.legrand, I'm not sure why you say you do not have access to DSWS, since your Eikon subscription includes access to DSWS. But if indeed for whatever reason you cannot use DSWS, you should be able to retrieve the data you're interested in using Eikon Data APIs. To construct the list of stocks you're interested in, you may want to use Screener. See the article titled Find Your Right Companies with SCREENER. To find the field names and parameters for the data items you're interested in, you can use CodeCreator app in Eikon, which allows you to search for the field names or browse available field names by category, then select the parameters applicable to the field name selected. At the end of this CodeCreator produces a Python code snippet for the data retrieval call, which you can copy & paste into your IDE, and then modify it for the syntax that Eikon Data APIs library for R requires.

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
2.2k 15 2 2

Hi,


1. You can search for indices on Workspace and pick the one that best fits your needs:

1624638880761.png

Then you can look into constituents:
1624638950610.png


2. Once you have your constituents, I'd suggest simply using the DSWS R library that was created by the Dev. Community:

https://github.com/CharlesCara/DatastreamDSWS2R


You can use this in a similar way to what I did in this article:

https://developers.refinitiv.com/en/article-catalog/article/information-demand-and-stock-return-predictability-coded-in-r-part-1


3. When you create a Request Table in Excel, does the data come up with Excel code in a single cell? If so, would you mind sharing it here? We might be able to reproduce it in R


1624638880761.png (126.2 KiB)
1624638950610.png (138.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.

Upvotes
3 1 1 3
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.