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

pynance.opt.core.Options.tolist() produces tz-naive Timestamps #3

Open
aisthesis opened this issue Mar 26, 2015 · 2 comments
Open

pynance.opt.core.Options.tolist() produces tz-naive Timestamps #3

aisthesis opened this issue Mar 26, 2015 · 2 comments

Comments

@aisthesis
Copy link
Collaborator

Timezone should in this case be in 'US/Eastern' to simplify questions having to do with market closings (EDT vs. EST) and given that quote times are in actuality US Eastern time. The dataframe, however, pulls them from Yahoo as tz-naive times, and that is passed along in my use case to the BSON object stored in Mongo. These should all be cleaned up to be aware that the time zone is US/Eastern.

Related:

@aisthesis aisthesis added the bug label Mar 26, 2015
@aisthesis
Copy link
Collaborator Author

>>> dsum = dailysummary.summarize() # DataFrame derived from what is retrieved by Pandas
>>> pd.to_datetime(dsum.loc['Quote_Time'].values[0]).tz_convert('Europe/Berlin')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pandas/tslib.pyx", line 444, in pandas.tslib.Timestamp.tz_convert (pandas/tslib.c:10218)
TypeError: Cannot convert tz-naive Timestamp, use tz_localize to localize

@aisthesis
Copy link
Collaborator Author

Pandas is still debating what behavior they intend to use. Let's leave this issue open until they reach a reliable solution, which may even fix the problem.

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

No branches or pull requests

1 participant