Git Product home page Git Product logo

Comments (13)

rsheftel avatar rsheftel commented on May 28, 2024

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.

fin-eng avatar fin-eng commented on May 28, 2024

from pandas_market_calendars.

rsheftel avatar rsheftel commented on May 28, 2024

@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.

kewlfft avatar kewlfft commented on May 28, 2024

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.

kewlfft avatar kewlfft commented on May 28, 2024

@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.

rsheftel avatar rsheftel commented on May 28, 2024

@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.

kewlfft avatar kewlfft commented on May 28, 2024

@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.

kewlfft avatar kewlfft commented on May 28, 2024

@fin-eng if you give me an example of issue for Christmas I can look into it as well

from pandas_market_calendars.

rsheftel avatar rsheftel commented on May 28, 2024

@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.

fin-eng avatar fin-eng commented on May 28, 2024

from pandas_market_calendars.

kewlfft avatar kewlfft commented on May 28, 2024

@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.

kewlfft avatar kewlfft commented on May 28, 2024

@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.

rsheftel avatar rsheftel commented on May 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.