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

HIGH_52WEEK does not return historical data with ref_hist function #91

Open
JonathanBechtel opened this issue Jan 29, 2021 · 1 comment
Labels

Comments

@JonathanBechtel
Copy link

JonathanBechtel commented Jan 29, 2021

# Your code here, this should be a minimal reproducible example, see https://stackoverflow.com/help/mcve
con = pdblp.BCon(timeout=7500)
con.start()
date_range = pd.date_range(start='20190701', end='20201225', freq='W-Mon')
date_range = [date.strftime('%Y%m%d') for date in date_range]
con.ref_hist('CAKE UW EQUITY', 'HIGH_52WEEK', dates=date_range, date_field='REFERENCE_DATE')

Problem description

[this should explain why the current behaviour is a problem and why the expected output is a better solution.]
The ref_hist function call does not seem to return historical data for the HIGH_52WEEK field, only the most current data point.

I assume there might be a problem the date field that I am using. I've tried using REFERENCE_DATE, MLI_DATE and CURVE_DATE, but none of them seem to return historical values.

Do you know if there's a particular way to access this data historically?

[paste the output of pdblp.__version__ here below this line]

@JonathanBechtel JonathanBechtel changed the title Getting Historical Data For the 52Week High HIGH_52WEEK does not return historical data with ref_hist function Jan 29, 2021
@matthewgilbert
Copy link
Owner

ref_hist is just a convenience function that makes multiple ReferenceDataRequest calls, overriding the date_field given. In your example REFERENCE_DATE is not an applicable override to the HIGH_52WEEK field

Selection_357

An example where this would work is shown below

Selection_358

To get this field historically I would contact Bloomberg HELP, but given it relies on intraday data it is possible it won't be available.

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

No branches or pull requests

2 participants