I'm using datastream to get a time series, but I cannot figure out how to get the tenor in the response.
The Below Returns me (Instrument, Datatype, Value, Currency, Dates).
Ideally I would be able to Extract out a tenor column with values 1M, 3M, 6M, 1Y, 3Y without having to try and break it out of the RIC Code. How can this be achived?
Thanks,
Adam
dateString = "2022-07-14"
market_data_df = ds.get_data(tickers='<USYTFRB1M=RR>,<USYTFRB2M=RR>,<USYTFRB3M=RR>,<USYTFRB6M=RR>,<US1YT=RR>,<US2YT=RR>,<US3YT=RR>,<US5YT=RR>,<US7YT=RR>,<US10YT=RR>,<US20YT=RR>,<US30YT=RR>', fields=['RY'], start=f'{dateString}',end=f'{dateString}', kind=1)
market_data_df