有没有人使用 Blpapi/Pdblp 等包从彭博导出供应链数据(SPLC)?
Has anybody used Blpapi/Pdblp etc packages to export Supply chain data (SPLC) from Bloomberg?
我正在使用 pdblp 包来收集供应链数据。但我面临两个问题。首先,它只给了我当前日期的前五个供应商,甚至不是全部。此外,它没有提供任何历史数据。通过更改任何日期,仍会得到相同的结果。我搜索了所有网络,没有从彭博社收集供应链数据的教程手册。所以,我想知道是否有人对此有任何经验或解决方案。非常感谢!
下面显示了我使用 con.bulkref_hist() 和 con.bulkref() 收集 APPLE Inc. 供应商的代码。如输出所示,我只得到 5 个 Apple 供应商?不是全部,甚至我也无法更改日期。
import pdblp
con = pdblp.BCon(debug=True, port=8194, timeout=100000)
con.start()
con.bulkref('AAPL US Equity', 'SUPPLY_CHAIN_SUPPLIERS',ovrds=[('DZ414',"20100626")])
# Your code here, this should be a minimal reproducible example, see https://whosebug.com/help/mcve
pdblp.pdblp:INFO:Sending Request:
ReferenceDataRequest = {
securities[] = {
"AAPL US Equity"
}
fields[] = {
"SUPPLY_CHAIN_SUPPLIERS"
}
overrides[] = {
overrides = {
fieldId = "DZ414"
value = "20100626"
}
}
}
pdblp.pdblp:INFO:Event Type: 'RESPONSE'
pdblp.pdblp:INFO:Message Received:
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "AAPL US Equity"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
SUPPLY_CHAIN_SUPPLIERS[] = {
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "2317 TT Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "4938 TT Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "2382 TT Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "601138 CH Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "2330 TT Equity"
}
}
}
}
}
}
dates = ["20100626"]
con.bulkref_hist("AAPL US Equity", ["DZ405"],dates)
pdblp.pdblp:INFO:Sending Request:
ReferenceDataRequest = {
securities[] = {
"AAPL US Equity"
}
fields[] = {
"DZ405"
}
overrides[] = {
overrides = {
fieldId = "REFERENCE_DATE"
value = "20100626"
}
}
}
或以下内容:
pdblp.pdblp:INFO:Event Type: 'RESPONSE'
pdblp.pdblp:INFO:Message Received:
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "AAPL US Equity"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
DZ405[] = {
DZ405 = {
Equity Ticker = "2317 TT Equity"
}
DZ405 = {
Equity Ticker = "4938 TT Equity"
}
DZ405 = {
Equity Ticker = "2382 TT Equity"
}
DZ405 = {
Equity Ticker = "601138 CH Equity"
}
DZ405 = {
Equity Ticker = "2330 TT Equity"
}
}
}
}
}
}
我在这两种方法中的输出如下。并非所有供应商。
date | ticker | field | name | value | position
-- | -- | -- | -- | -- | --
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 2317 TT Equity | 0
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 4938 TT Equity | 1
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 2382 TT Equity | 2
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 601138 CH Equity | 3
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 2330 TT Equity | 4
In [1]: from xbbg import blp
In [2]: blp.bds('AAPL US Equity', 'SUPPLY_CHAIN_SUPPLIERS', Supply_Chain_Count_Override=10)
Out[2]:
equity_ticker
AAPL US Equity 2317 TT Equity
AAPL US Equity 4938 TT Equity
AAPL US Equity 2382 TT Equity
AAPL US Equity 601138 CH Equity
AAPL US Equity 2330 TT Equity
AAPL US Equity 034220 KS Equity
AAPL US Equity 005930 KS Equity
AAPL US Equity INTC US Equity
AAPL US Equity JBL US Equity
AAPL US Equity 2324 TT Equity
顺便说一句,DZ414
不在 SUPPLY_CHAIN_SUPPLIERS
的可用覆盖列表中,该值只能是 C
或 R
。
我正在使用 pdblp 包来收集供应链数据。但我面临两个问题。首先,它只给了我当前日期的前五个供应商,甚至不是全部。此外,它没有提供任何历史数据。通过更改任何日期,仍会得到相同的结果。我搜索了所有网络,没有从彭博社收集供应链数据的教程手册。所以,我想知道是否有人对此有任何经验或解决方案。非常感谢!
下面显示了我使用 con.bulkref_hist() 和 con.bulkref() 收集 APPLE Inc. 供应商的代码。如输出所示,我只得到 5 个 Apple 供应商?不是全部,甚至我也无法更改日期。
import pdblp
con = pdblp.BCon(debug=True, port=8194, timeout=100000)
con.start()
con.bulkref('AAPL US Equity', 'SUPPLY_CHAIN_SUPPLIERS',ovrds=[('DZ414',"20100626")])
# Your code here, this should be a minimal reproducible example, see https://whosebug.com/help/mcve
pdblp.pdblp:INFO:Sending Request:
ReferenceDataRequest = {
securities[] = {
"AAPL US Equity"
}
fields[] = {
"SUPPLY_CHAIN_SUPPLIERS"
}
overrides[] = {
overrides = {
fieldId = "DZ414"
value = "20100626"
}
}
}
pdblp.pdblp:INFO:Event Type: 'RESPONSE'
pdblp.pdblp:INFO:Message Received:
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "AAPL US Equity"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
SUPPLY_CHAIN_SUPPLIERS[] = {
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "2317 TT Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "4938 TT Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "2382 TT Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "601138 CH Equity"
}
SUPPLY_CHAIN_SUPPLIERS = {
Equity Ticker = "2330 TT Equity"
}
}
}
}
}
}
dates = ["20100626"]
con.bulkref_hist("AAPL US Equity", ["DZ405"],dates)
pdblp.pdblp:INFO:Sending Request:
ReferenceDataRequest = {
securities[] = {
"AAPL US Equity"
}
fields[] = {
"DZ405"
}
overrides[] = {
overrides = {
fieldId = "REFERENCE_DATE"
value = "20100626"
}
}
}
或以下内容:
pdblp.pdblp:INFO:Event Type: 'RESPONSE'
pdblp.pdblp:INFO:Message Received:
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "AAPL US Equity"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
DZ405[] = {
DZ405 = {
Equity Ticker = "2317 TT Equity"
}
DZ405 = {
Equity Ticker = "4938 TT Equity"
}
DZ405 = {
Equity Ticker = "2382 TT Equity"
}
DZ405 = {
Equity Ticker = "601138 CH Equity"
}
DZ405 = {
Equity Ticker = "2330 TT Equity"
}
}
}
}
}
}
我在这两种方法中的输出如下。并非所有供应商。
date | ticker | field | name | value | position
-- | -- | -- | -- | -- | --
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 2317 TT Equity | 0
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 4938 TT Equity | 1
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 2382 TT Equity | 2
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 601138 CH Equity | 3
20100626 | AAPL US Equity | DZ405 | Equity Ticker | 2330 TT Equity | 4
In [1]: from xbbg import blp
In [2]: blp.bds('AAPL US Equity', 'SUPPLY_CHAIN_SUPPLIERS', Supply_Chain_Count_Override=10)
Out[2]:
equity_ticker
AAPL US Equity 2317 TT Equity
AAPL US Equity 4938 TT Equity
AAPL US Equity 2382 TT Equity
AAPL US Equity 601138 CH Equity
AAPL US Equity 2330 TT Equity
AAPL US Equity 034220 KS Equity
AAPL US Equity 005930 KS Equity
AAPL US Equity INTC US Equity
AAPL US Equity JBL US Equity
AAPL US Equity 2324 TT Equity
顺便说一句,DZ414
不在 SUPPLY_CHAIN_SUPPLIERS
的可用覆盖列表中,该值只能是 C
或 R
。