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

Half day in Brazilian Stock Exchange #99

Open
willianpaixao opened this issue Nov 9, 2019 · 8 comments
Open

Half day in Brazilian Stock Exchange #99

willianpaixao opened this issue Nov 9, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@willianpaixao
Copy link
Contributor

In the Brazilian calendar, Ash Wednesday is a half day, starting trading at 1pm. [1]

I noticed it's already implemented, but with it's currently commented and have a TODO tag. [2]

Judging by the same feature being implemented here, I guess the code can now be commented out, right?

@gerrymanoim
Copy link
Collaborator

Hey @willianpaixao - thank you for reporting this.

I believe Ash Wednesday should be handled in https://github.com/quantopian/trading_calendars/blame/master/trading_calendars/exchange_calendar_bvmf.py#L61.

I agree that the commented code with the TODO tag should just be removed

# TODO: Add this late open back in later, once we have better

@willianpaixao
Copy link
Contributor Author

Hi @gerrymanoim,

Isn't clear, in

I believe Ash Wednesday should be handled in https://github.com/quantopian/trading_calendars/blame/master/trading_calendars/exchange_calendar_bvmf.py#L61

The short day is already implemented? Cause I don't see a reference to special opening time.

@gerrymanoim
Copy link
Collaborator

Apologies @willianpaixao - I think I misread this originally. You're right - the short day doesn't seem to be implemented. We'll get that sorted.

@willianpaixao
Copy link
Contributor Author

No worries @gerrymanoim, if you comment a file where the feature is already implemented, I would gladly send a Pull Request fixing the Brazilian SE.

@jmccorriston
Copy link
Contributor

jmccorriston commented Jan 7, 2020

I believe this is the only instance of a late open (at least, it's the only instance we've encountered in any of the supported calendars so far). If I recall correctly, the reason we left this commented out initially was because we weren't sure how it would interact with Pipelines in https://github.com/quantopian/zipline. I'll bring this up with some folks who are more knowledgeable about zipline and share what I learn.

In the meantime, I'm labeling this issue as a 'bug', since we believe that the half-day should be included in the Brazilian SE calendar.

@jmccorriston jmccorriston added the bug Something isn't working label Jan 7, 2020
@willianpaixao
Copy link
Contributor Author

I just found an exiting (but commented) unit test for this feature.

# FIXME: add back in later.
# def test_late_opens(self):
# # Ash Wednesday, 46 days before Easter Sunday
# late_opens = [
# pd.Timestamp("2016-02-10", tz=UTC),
# pd.Timestamp("2017-03-01", tz=UTC),
# pd.Timestamp("2018-02-14", tz=UTC),
# ]
# for late_open_session_label in late_opens:
# self.assertIn(
# late_open_session_label,
# self.calendar.late_opens,
# )

@willianpaixao
Copy link
Contributor Author

Friendly ping @jmccorriston

@willianpaixao
Copy link
Contributor Author

Hi @richafrank, would you mind commenting your thoughts on the issue?

sercant pushed a commit to AlpacaTechJP/trading_calendars that referenced this issue Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants