pdblp
pdblp copied to clipboard
'GSERFCI INDEX' cause problem
I can replace 'GSERFCI INDEX' with 'not a ticker' the program run fine but if I use 'GSERFCI INDEX'. code doesn't run poperly. no df_out and problem_tickers='index' . There are several "name" cause the problem this is one of them.
Can you help? thank you.
con = pdblp.BCon() con.start() tickers = [['C US Equity','SPY US Equity','IBM US Equity', 'S5INSS INDEX', 'GSERFCI INDEX']] df_out = pd.DataFrame() L = [] for i in tickers: try: df = con.ref(i, ["PX_LAST"]) df_out = df_out.append(df) except Exception as e: problem_ticker = e.args[0].split()[-1] L.append(problem_ticker) problem_tickers = pd.DataFrame(L, columns=['TICKER'])
You probably want to set con.debug = True
and look at the output for indications of the possible issue.