question

Upvotes
Accepted
1 1 1 3

RDP OHLC when start date is earlier than first trade date

I am using RDP to request the price data for list of rics with different first trade dates. Since they have different first trade dates, I'm using a start_date_str_YYYYMMDD="2007-01-01". However I realize if the start date is earlier than the first trade date. The returned data fills the data incorrectly. First off it has data from 2007-01-01 onwards (which the stock hasn't been trade), the filled data are actually those date from first trade date onwards. Then, there are rows of nan before the first_trade_date.

import refinitiv.dataplatform as rdp
session = rdp.open_platform_session(app_key=REFINITIV_APP_KEY,
                                        grant=rdp.GrantPassword(username=RDP_LOGIN, password=RDP_PASSWORD))
df = rdp.get_data(universe=ric_list, fields=field_list, parameters= {'SDate': start_date_str_YYYYMMDD, 'EDate': end_date_str_YYYYMMDD, 'FRQ': 'D'})
rdp-api#product#contentprice-history
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.

Hi @thomas01 ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@thomas01

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@thomas01

Thank you for reaching out to us.

I tested with the following RICs and fields.

df = rd.get_data(
    ['AAPL.O','CART.O'],
    ['TR.PriceClose.Date','TR.PriceClose','TR.OpenPrice','TR.HighPrice','TR.LowPrice'], 
    {'SDate':'2007-01-01', 'EDate':'2023-10-10'})

df[df["Instrument"]=='CART.O']

The output for CART.O is correct. There are only 16 rows.

1697003110234.png

Please share the sample RICs and fields that you are using.


1697003110234.png (31.8 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.