Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply chain data (SPLC) History #84

Open
fluorescent89 opened this issue Jul 30, 2020 · 3 comments
Open

Supply chain data (SPLC) History #84

fluorescent89 opened this issue Jul 30, 2020 · 3 comments
Labels

Comments

@fluorescent89
Copy link

Code Sample, a copy-pastable example if possible

Hello,

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()

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"
        }
    }
}

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"
                    }
                }
            }
        }
    }
}


#### Expected Output
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


#### Version Information

[paste the output of ``pdblp.__version__`` here below this line]
@matthewgilbert matthewgilbert changed the title Has anybody used pdblp package to gather supply chain data (SPLC) from Bloomberg? Supply chain data (SPLC) History Jul 31, 2020
@matthewgilbert
Copy link
Owner

I personally have not used this so cannot comment, but possibly someone else can comment. You might get better traction posting this on StackOverflow with the tag blpapi though, since this is more related to the underlying Bloomberg service and not pdblp which is just a wrapper around this.

@fluorescent89
Copy link
Author

@matthewgilbert Thank you so much for the response. You are right it is not directly related to pdblp, just wanted to people who are involved with this package have any experience/suggestions. I have searched the StackOverflow there and posted it as well, still No luck.

@ZhihaoMa
Copy link

I hava some problem. Do u solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants