I am using pdblp package to gather supply chain data. But I am facing two problems. First, it just gives me the just first five suppliers of current date, not even all. Also, it does not give any historical data. By changing any date, still get the same results. I searched all web, there is no manual of tutorial for gathering supply chain data from Bloomberg. So, I was wondering if anybody has any experience or solution for this. Thank you so much!
The following shows my codes which I used con.bulkref_hist() and con.bulkref() in order to gather the suppliers of APPLE Inc. As shown in output, I just get 5 suppliers of Apple? Not all and even I cannot change the date.
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://stackoverflow.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"
}
}
}
or the following:
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"
}
}
}
}
}
}
My outputs in both methods are the following. Not all suppliers.
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
Btw, DZ414
is not in the list of available overrides for SUPPLY_CHAIN_SUPPLIERS
, and the value can only be C
or R
.