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

Issue with overwrite field #85

Open
ASHLYNZ opened this issue Sep 4, 2020 · 1 comment
Open

Issue with overwrite field #85

ASHLYNZ opened this issue Sep 4, 2020 · 1 comment

Comments

@ASHLYNZ
Copy link

ASHLYNZ commented Sep 4, 2020

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
Copy link

otpoon commented Sep 29, 2020

hey try the below?

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

from ovrds to elms

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

No branches or pull requests

2 participants