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'})

Best Answer

  • @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.