1

I'm getting "ref() got an unexpected keyword argument 'ignore_security_error'" when using ignore_security_error=1 with Blpapi. I have some bad tickers in my list i want to ignore using ignore_security_error=1 but getting an error. tc3 is a ticker list generated from a .csv file.

 M2= con.ref(tc3,["PX_LAST","CONTRACT_VALUE","CHG_PCT_1YR","CHG_PCT_6M","CHG_PCT_3M","CHG_PCT_1M","FO211","MARKET_SECTOR_DES","ID_BB_COMPANY"],ignore_security_error=1)

any one else having this problem?

2 Answers2

0

It looks like it is requesting a list of tuples for overrides. Try passing it in like

 M2= con.ref(tc3,["PX_LAST","CONTRACT_VALUE","CHG_PCT_1YR","CHG_PCT_6M","CHG_PCT_3M","CHG_PCT_1M","FO211","MARKET_SECTOR_DES","ID_BB_COMPANY"],[('ignore_security_error', 1)])

See https://github.com/matthewgilbert/pdblp/blob/master/pdblp/pdblp.py#L322

Note It may take in True instead of 1. If this code does not work, try replacing it.

Saddy
  • 1,515
  • 1
  • 9
  • 20
  • I used both 1 and True and get the error "string indices must be integers", but this did eliminate the original error. – Andrew Bunker Jan 08 '20 at 19:25
  • I'm using Pdblp not Blpapi to call the Bloomberg fields and the ovrds 'ignore_security_error=1' is not valid using Pdblp package. – Andrew Bunker Jan 09 '20 at 14:59
0
In [1]: from xbbg import blp
In [2]: tc3 = ...
In [3]: flds = [...]
In [4]: m2 = blp.bdp(tickers=tc3, flds=flds).dropna(how='all')

Reference: xbbg

Alpha
  • 2,372
  • 3
  • 21
  • 23