Comments (5)
It's helpful to include a full print out of messages to the console with con.debug = True
for debugging purposes. Running your above snippet (with or without any overrides) I am seeing
import pdblp
con = pdblp.BCon(debug=True)
con.start()
con.bdh('SPY US EQUITY', 'SP_VOL_SURF_MID', '20150629', '20150630')
DEBUG:root:Sending Request:
HistoricalDataRequest = {
securities[] = {
"SPY US EQUITY"
}
fields[] = {
"SP_VOL_SURF_MID"
}
startDate = "20150629"
endDate = "20150630"
overrides[] = {
}
}
DEBUG:root:Message Received:
HistoricalDataResponse = {
securityData = {
security = "SPY US EQUITY"
eidData[] = {
}
sequenceNumber = 0
fieldExceptions[] = {
fieldExceptions = {
fieldId = "SP_VOL_SURF_MID"
errorInfo = {
source = "236::bbdbh1"
code = 1
category = "BAD_FLD"
message = "Not valid historical field"
subcategory = "NOT_APPLICABLE_TO_HIST_DATA"
}
}
}
fieldData[] = {
}
}
}
Which seems to indicate this field
is not available through a HistoricalDataRequest
and is unrelated to any overrides
.
from pdblp.
Thanks. This is a bdp function and not BDH. It's what It is ReferenceDataRequest. Is ReferenceDataRequest not supported in pdblp?
from pdblp.
ReferenceDataRequest
s are supported through BCon.ref
, you can take a look at the tutorial to give you more info on relevant functionality https://matthewgilbert.github.io/pdblp/tutorial. When I run
con.ref('SPY US EQUITY', 'SP_VOL_SURF_MID')
DEBUG:root:Sending Request:
ReferenceDataRequest = {
securities[] = {
"SPY US EQUITY"
}
fields[] = {
"SP_VOL_SURF_MID"
}
overrides[] = {
}
}
DEBUG:root:Message Received:
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "SPY US EQUITY"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
}
}
}
}
I am not getting any errors in the response message however I am also not getting any data. This could be a permission issue of my end though, since for the field SP_VOL_SURF_MID
I see
Single point volatility surface mid interpolated from BVOL... BVOL source data
is for privileged Bloomberg Valuation (BVAL) users only.
from pdblp.
Thank you I got it working the following way. Can you also tell me how can I choose a range for REFERENCE_DATE override. Right now it is set to 1 day only. Should I loop and append? or there is a way to pass in a range in the function?
import pdblp
con = pdblp.BCon(debug=True)
con.start()
print con.ref('SPY US EQUITY', 'SP_VOL_SURF_MID',ovrds=[('REFERENCE_DATE','20170525'),('VOL_SURF_EXPIRY_OVR','20180119'),('VOL_SURF_STRIKE_OVR','200')])
ticker field value
0 SPY US EQUITY SP_VOL_SURF_MID 19.261268
ReferenceDataRequest = {
securities[] = {
"SPY US EQUITY"
}
fields[] = {
"SP_VOL_SURF_MID"
}
overrides[] = {
overrides = {
fieldId = "REFERENCE_DATE"
value = "20170525"
}
overrides = {
fieldId = "VOL_SURF_EXPIRY_OVR"
value = "20180119"
}
overrides = {
fieldId = "VOL_SURF_STRIKE_OVR"
value = "200"
}
}
}
DEBUG:root:Message Received:
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "SPY US EQUITY"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
SP_VOL_SURF_MID = 19.261268
}
}
}
}
from pdblp.
Looping and appending is one way, you could also take a look at the ref_hist
method. Since I don't have access to this data it is difficult for me to provide more help, but given that you are overriding the REFERENCE_DATE
the ref_hist
method should work.
from pdblp.
Related Issues (20)
- Commodity curve CCRV HOT 1
- Commodity curve CCRV HOT 2
- Getting an error when tryning to pip install the package
- why restart not working ? thank you very much
- Options chain data not loading from Bloomberg
- Supply chain data (SPLC) History HOT 3
- Issue with overwrite field HOT 1
- Curve ref_hist with Nans
- BEQS HOT 1
- pdblp BDH Overrides with CDR HOT 3
- bdh() sometimes gets data arbitrary
- Override missing PX_LAST to get last available price HOT 2
- HIGH_52WEEK does not return historical data with ref_hist function HOT 1
- 'GSERFCI INDEX' cause problem HOT 1
- BDH function raises an error for certain securities without returning data for other securities HOT 2
- Intraday bar data pulled with bdib doesn't match BBG QR HOT 3
- Override release date HOT 1
- BSRCH help HOT 1
- issue regarding BSRCH (only 5 results returned)
- Timeout on
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdblp.