I am trying to implement the python equivalent of the excel command, BDP("SPX Index", "RT_PX_CHG_PCT_1D") but I see NaN. Anyone knows how to fix this?
Here is how I am using it in my python code. I have a dataframe, df that holds indexes like SPX Index, etc. I use the get_reference_data() method to retrieve real time %age change of price but I get NaN:
temp = LocalTerminal.get_reference_data(df['Index'], ['RT_PX_CHG_PCT_1D'], ignore_field_error=1, ignore_security_error=1)
newDf = temp.as_frame()
My output is:
SPX Index NaN
Any thoughts?