Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rblpapi - using bdp with ISIN / Cusip gives error

I get following error, when I use bdp with ISIN or CUSIP.

bdp ("US25470XAB10 ISIN","ULT_PARENT_TICKER_EXCHANGE")
bdp ("25470XAB1 CUSIP","ULT_PARENT_TICKER_EXCHANGE")

Error in bdp_Impl(con, securities, fields, options, overrides, identity) : 
attempt to set an attribute on NULL

However, using the Bloomberg ID (below) seems to work.

bdp("EI000902 Corp","ULT_PARENT_TICKER_EXCHANGE")

Appreciate any workarounds or solutions.

like image 426
pulp_fiction Avatar asked Jan 08 '16 15:01

pulp_fiction


2 Answers

I was having problem with converting CUSIP to TICKER via Rblpapi. This solved my problem.

bdp("/cusip/143130102","TICKER")
like image 167
z3r Avatar answered Nov 18 '22 08:11

z3r


I think I figured this out. It is not a Rblpapi thing, it is at the bloomberg level. It is a security name formatting thing I guess. According to a guy I spoke with at bloomberg (they are SOMETIMES helpful... SOMEtimes.. ), when you use the ISIN, you have to specify the asset type. You do not use 'ISIN' in the security name, but any one of the asset types located in the yellow keys on the bloomberg keyboard. (Which doesn't make sense, because I know for a fact bond data will sometimes come in using 'ISIN' in the security name, and all types of data seems to always work in the desktop (excel) API. But, whatever. It's Bloomberg.)

So, for example,

bdp ("US25470XAB10 ISIN","ULT_PARENT_TICKER_EXCHANGE")

should be

bdp ("US25470XAB10 Corp","ULT_PARENT_TICKER_EXCHANGE")

I know this works for ISINs, but I dont have CUSIP IDs and have not tested it. (I have a list of foreign preferreds, equities and bonds, and as long as i use 'PFD', 'EQUITY', and 'CORP' after the ISIN, it grabs the data just fine.)

I have been struggling with this same issue for about a day now, and I think this is the solution. So far, it seems to work great. However, please let me know if it breaks for you, or if you find any caveats.

like image 37
lukehawk Avatar answered Nov 18 '22 08:11

lukehawk