For proper financial FX option pricing I require the exact number of business days between two dates. These dates can be up to 10 years in the future, for 2 different countries. I therefore need to know, in advance the holidays for both of those countries between the two dates. I plan to restrict myself to G20 countries for now.
Anybody know if Python modules exist which have holiday lists included?
Anywhere else to find holiday lists/files?
Edit: Updated the link from from novapost's github repo.
I recently came across https://github.com/peopledoc/workalendar. I use it for France and it works like a charm.
"""
>>> from datetime import date
>>> from workalendar.europe import France
>>> cal = France()
>>> cal.holidays(2013)
[(datetime.date(2013, 1, 1), 'New year'),
(datetime.date(2013, 4, 1), 'Easter Monday'),
(datetime.date(2013, 5, 1), 'Labour Day'),
(datetime.date(2013, 5, 8), 'Victory in Europe Day'),
(datetime.date(2013, 5, 9), 'Ascension Thursday'),
(datetime.date(2013, 5, 20), 'Whit Monday'),
(datetime.date(2013, 5, 30), 'Corpus Christi'),
(datetime.date(2013, 7, 14), 'Bastille Day'),
(datetime.date(2013, 8, 15), 'Assumption of Mary to Heaven'),
(datetime.date(2013, 11, 1), 'All Saints Day'),
(datetime.date(2013, 11, 11), 'Armistice Day'),
(datetime.date(2013, 12, 25), 'Christmas Day')]
>>> cal.is_working_day(date(2013, 12, 25)) # it's Christmas
False
>>> cal.is_working_day(date(2013, 12, 29)) # it's Sunday
False
>>> cal.is_working_day(date(2013, 12, 26))
True
www.bank-holidays.com seems cheaper.
However, if you look at the public holiday for banks in England, you see the following (http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_073741)
Special bank holidays
There are laws that allow the dates of bank holidays to be changed, or other holidays to be declared, for example to celebrate special occasions.
The most recent examples of special bank holidays were for the Royal Wedding in 1981, the Millennium holiday in 1999 and the Queen’s Golden Jubilee in 2002.
So. It is not possible to predict holiday in the next ten year. One possibility would be to approximate the number of holiday in a given period.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With