I want to download the Bid-Ask Yield spread.
But I am not sure which field I need to use.
Below is my python code to download the bid, ask,mid yields.
I hope you can help me to find an appropriate field for bid-ask spread.
Currently using below
fields = ['B_YLD_1', 'A_YLD_1', 'MID_YLD_1', 'YLDTOMAT']
fields_length = len(fields)
st = "2000-01-01"
ed = "2025-12-31"
for idx in tqdm(range(fields_length), 'Retrieving the historical data'):
field = fields[idx]
df_ylds = rd.get_history(
universe=rrps_isin_lists,
fields=[field],
start= st,
end=ed,
interval="1D"
)
df_ylds = df_ylds.dropna(axis=1, how='all')
df_ylds.to_csv(rf'./Refinitiv/Output/{20250625}_{field}_df.csv')