当前位置: 动力学知识库 > 问答 > 编程问答 >

r - 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.

网友答案:

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.

网友答案:

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

bdp("/cusip/143130102","TICKER")
分享给朋友:
您可能感兴趣的文章:
随机阅读: