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

fix fx bug and add 2024 calendar #45

Merged
merged 2 commits into from
Dec 25, 2023
Merged

fix fx bug and add 2024 calendar #45

merged 2 commits into from
Dec 25, 2023

Conversation

cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented Dec 25, 2023

previously calendar would return is_market_open = True for FX if its after Sunday 5pm ET but next day is a holiday when it should be False

@@ -60,7 +74,7 @@ def is_market_open(asset_type: str, dt: datetime.datetime) -> bool:
return False

if asset_type in ["fx", "metal"]:
if date in FX_METAL_HOLIDAYS:
if date in FX_METAL_HOLIDAYS and time < FX_METAL_OPEN_CLOSE_TIME:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you double check this?

@cctdaniel cctdaniel merged commit fdff423 into main Dec 25, 2023
@cctdaniel cctdaniel deleted the fix-calendar branch December 25, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants