matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
240 stars 69 forks source link

Currency overrides for ref bulk #76

Closed lyradmil closed 4 years ago

lyradmil commented 4 years ago

Code Sample (below) - not working

df_deal_id = con.ref(df.loc[i, 'BB_TICKER'], ["OWNER_DEAL_ID"])   # get parent deal id
df_blp = con.bulkref(df_deal_id['value'].iloc[0] + ' Corp', "SW_PAY_CASH_FLOW", [('CRNCY', 'EUR')])   # get payment cash flow based on parent deal id

Problem description

I am not able to select the currency of choice for this data field. I have also tried the following override values to no avail: 'CURRENCY'. 'EQY_FUND_CRNCY'

Version Information

Running on pdblp 0.1.8

matthewgilbert commented 4 years ago

Please set debug=True in your connection object and include the output.

lyradmil commented 4 years ago

The output is similar for all overrides I have indicated as above.


2019-12-09 17:52:28,204 - INFO - Sending Request:
ReferenceDataRequest = {
    securities[] = {
        "SLSM0N90 Corp"
    }
    fields[] = {
        "SW_PAY_CASH_FLOW"
    }
    overrides[] = {
        overrides = {
            fieldId = "CRNCY"
            value = "SGD"
        }
    }
}

2019-12-09 17:52:28,205 - WARNING - "pdblp.BCon.debug=True" is ignored when user specifies logging event handlers
2019-12-09 17:52:28,653 - INFO - Event Type: 'RESPONSE'
2019-12-09 17:52:28,654 - INFO - Message Received:
ReferenceDataResponse = {
    securityData[] = {
        securityData = {
            security = "SLSM0N90 Corp"
            eidData[] = {
            }
            fieldExceptions[] = {
            }
            sequenceNumber = 0
            fieldData = {
                SW_PAY_CASH_FLOW[] = {
                    SW_PAY_CASH_FLOW = {
                        Payment Date = 2020-05-26
                        Discounted Cash Flow = -135000.000000
                    }
                    SW_PAY_CASH_FLOW = {
                        Payment Date = 2020-11-24
                        Discounted Cash Flow = -135000.000000
                    }
                    SW_PAY_CASH_FLOW = {
                        Payment Date = 2021-05-24
                        Discounted Cash Flow = -135000.000000
                    }
                    SW_PAY_CASH_FLOW = {
                        Payment Date = 2021-11-24
                        Discounted Cash Flow = -135000.000000
                    }
                    SW_PAY_CASH_FLOW = {
                        Payment Date = 2022-05-24
                        Discounted Cash Flow = -135000.000000
                    }
                    SW_PAY_CASH_FLOW = {
                        Payment Date = 2022-11-25
                        Discounted Cash Flow = -9135000.000000
                    }
                }
            }
        }
    }
}
matthewgilbert commented 4 years ago

If I understand your question correctly it looks like the overrides are just being ignored. This is related to the backend Bloomberg service, and blpapi. This is unrelated to pdblp, I would contact the Bloomberg Help desk.