Closed philiphossu closed 2 years ago
Apologies for the late response I don't get much time to maintain this library these days.
For this type of issue generally the best approach is to look at the raw Bloomberg response data. If this is an issue with an inconsistency in the underlying data there isn't much blp
can do and you are best of contacting Bloomberg directly. To get back the underlying data unparsed you can take a look at the example here https://matthewgilbert.github.io/blp/quickstart.html#Retrieve-json-data, in particular something like
query = blp.create_query(
request_type="HistoricalDataRequest",
values={
"securities": ["SPY US Equity"],
"fields": ["VOLUME"],
"startDate": "20190101",
"endDate": "20190105",
},
)
resp = bquery.query(query, parse=False, collector=list)
I have attempted this earlier on and the data was still inconsistent between pulls for the same fields/time period/securities, again only on the bdh endpoint.
I suppose have to assume it's on bloomberg's end, but unfortunately they don't provide any feedback as they say 'we don't support anything in python' and only refer me back to the general API guidelines.
Guess I'm just out of luck for the time being.
I've noticed an issue using the package and could use some pointer in determining if it's an issue on my end, or with the package, or just with bloomberg's API.
I'm pulling a number of fields using bdh for a specific date in the past (using start_date == end_date) for a long list of mortgage cusips. Running the same query multiple times does not return consistent results sometimes. As an example, the query will successfully return 1m CPR, 6m CPR, 12m CPR, but for 3m CPR I only get "None", even though this doesn't match what my Bloomberg terminal says. See images below for reference -- all rows are correct except 297:
When I re-run the code to populate cpr_df, as previously stated, any of the following outcomes may take place without any apparent rhyme or reason: (1) the df remains with bug, (2) the bug is fixed, (3) some other bug is populated.
I've included snipets of the relevant parts of my script below.
Thank you for your input. Happy to provide more details if helpful.