matthewgilbert / pdblp

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

Issue with overwrite field #85

Open ASHLYNZ opened 3 years ago

ASHLYNZ commented 3 years ago

I'm having issue with overwrite field of extracting data from Bloomberg by setting currency to CAD

# import pandas as pd
#import pdblp
#hp_base = pd.DataFrame(con.bdh(SecList, Fields,business_day_month,end_date,ovrds=[('Currency','CAD')]))
#hp_local = pd.DataFrame(con.bdh(SecList, Fields,business_day_month,end_date]))

Expected Output

hoping to see hp_base in Canadian dollar while hp_local return the security in local currency.

Actual output

the 2 output are identical. both returned local currency. There is no issue with run hp_base:

hp_base = pd.DataFrame(con.bdh(SecList, Fields,business_day_month,end_date,ovrds=[('Currency','CAD')])) pdblp.pdblp:INFO:Sending Request: HistoricalDataRequest = { securities[] = { "MXWO Index" } fields[] = { "PX_LAST" } startDate = "20200831" endDate = "20200903" overrides[] = { overrides = { fieldId = "Currency" value = "CAD" } } }

pdblp.pdblp:INFO:Event Type: 'RESPONSE' pdblp.pdblp:INFO:Message Received: HistoricalDataResponse = { securityData = { security = "MXWO Index" eidData[] = { } sequenceNumber = 0 fieldExceptions[] = { } fieldData[] = { fieldData = { date = 2020-08-31 PX_LAST = 2455.510000 } fieldData = { date = 2020-09-01 PX_LAST = 2467.250000 } fieldData = { date = 2020-09-02 PX_LAST = 2494.100000 } fieldData = { date = 2020-09-03 PX_LAST = 2425.780000 } } } }

Version Information

pdblp.version Out[18]: '0.1.8'

otpoon commented 3 years ago

hey try the below?

hp_base = pd.DataFrame(con.bdh(SecList, Fields,business_day_month,end_date,elms=[('Currency','CAD')]))

from ovrds to elms