Comments (13)
I cannot find the error you mention. I added a new Eurex test in the test/ directory and the following code correctly detects the May 1st holiday (falling on 2nd May 2016) as not in valid_days. I also checked for 2017 and the code is correct. Can you post some code that does not correctly exclude the May 1st holiday from the valid_days. Thanks.
def test_2016_holidays():
# good friday: 2016-03-25
# May 1st: 2016-05-02
# christmas (observed): 2016-12-26
# new years (observed): 2016-01-02
eurex = EUREXExchangeCalendar()
good_dates = eurex.valid_days('2016-01-01', '2016-12-31')
for date in ["2016-03-25", "2016-05-02", "2016-12-26", "2016-01-02"]:
assert pd.Timestamp(date, tz='UTC') not in good_dates
from pandas_market_calendars.
from pandas_market_calendars.
@kewlfft since you made the initial contribution for the Eurex calendar do you have any thoughts on this? It does look correct that the package needs a fix but I would like to get your input before proceeding.
from pandas_market_calendars.
I designed the Eurex calendar pretty quickly to address most of the cases but i am not surpised it needs to be fine tuned. I can look more into it over the weekend but dont hesitate to correct directly if you have time.
from pandas_market_calendars.
@fin-eng for 1st of May I see your point, it will be closed for some markets (British, Russian, Irish) and for commo derivatives but not fully closed on monday if the 1st falls on a weekend. If we follow the rule 'fully closed' then we shouldn't shift the day. agreed.
from pandas_market_calendars.
@kewlfft if you could make the change this weekend that would be great. Note that I made a test file for the Eurex calendar so you can use that if you want to add some unit tests
from pandas_market_calendars.
@rsheftel I made the change and tested on 2016 and 2017, @fin-eng if you can also check if it is good now for May
from pandas_market_calendars.
@fin-eng if you give me an example of issue for Christmas I can look into it as well
from pandas_market_calendars.
@fin-eng I updated the Eurex unit tests (2d43560) if you could use that to identify if the work @kewlfft is good or not. If there is something incorrect can you please update the tests to what should be correct, then we have something to test against. Thanks.
from pandas_market_calendars.
from pandas_market_calendars.
@fin-eng @rsheftel I can propose a fix for Christmas if you have an actual example that we can check on the Eurex site it would help. Eurex covers many markets other than Germany and could adopt different rules.
from pandas_market_calendars.
@fin-eng @rsheftel I think the May 1st fix is quite safe to merge, then waiting for some concrete examples of Christmas to fix this one too if needed
from pandas_market_calendars.
@kewlfft I merged in your PR #15 last week as commit 7394989. We are all up to date now. @fin-eng if you come up with more examples of dates to correct that would be great. I am going to close this now, please open a new comment with new dates. thanks.
from pandas_market_calendars.
Related Issues (20)
- missing data for dates prior to 1995-01-01 HOT 3
- 2023-10-06 is not trade day HOT 1
- XNSE 2023-06-29 missing holiday HOT 1
- importing this package alters the behavior of pandas HOT 1
- ADD XJPX as an allias for JPX HOT 1
- 2023 XHKG typhoon closures
- date_range 1min ranges from 9:31am to 4pm instead of 9:30am to 3:59pm HOT 3
- 167 errors in tests HOT 1
- Good Friday is always a holiday for CBOE/CFE even when Christmas and NYE fall on a Friday
- not compatible with pandas >= 2.0.3 HOT 11
- Nasdaq Calendar HOT 1
- Eurex does not close on German National Day HOT 1
- XCSE - General Prayers Day is not a holiday anymore in Denmark
- Please update the pandas version dependency HOT 4
- 2 tests fail: AssertionError: assert <DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD> == zoneinfo.ZoneInfo(key='America/New_York')
- open_at_time future warning
- Juneteenth not added to the listed holidays in cme.py HOT 5
- CME globex USNewYearDay incorrect when NY is on Sunday HOT 1
- minimal version requirement HOT 1
- XNSE and XBOM special holiday 2024-01-22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas_market_calendars.