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

Add EEX #385

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ See the [minutes tutorial](docs/tutorials/minutes.ipynb) for a detailed explanat
| Astana International Exchange | AIXK | Kazakhstan | 3.2 | https://www.aix.kz/ |
| Bucharest Stock Exchange | XBSE | Romania | 3.2 | https://www.bvb.ro/ |
| Saudi Stock Exchange | XSAU | Saudi Arabia | 4.2 | https://www.saudiexchange.sa/ |
| European Energy Exchange AG | EEX | Germany | 4.3 | https://www.eex.com/ |

> Note that exchange calendars are defined by their [ISO-10383](https://www.iso20022.org/10383/iso-10383-market-identifier-codes) market identifier code.

Expand Down
2 changes: 2 additions & 0 deletions exchange_calendars/calendar_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .exchange_calendar_asex import ASEXExchangeCalendar
from .exchange_calendar_bvmf import BVMFExchangeCalendar
from .exchange_calendar_cmes import CMESExchangeCalendar
from .exchange_calendar_eex import EEXExchangeCalendar
from .exchange_calendar_iepa import IEPAExchangeCalendar
from .exchange_calendar_xams import XAMSExchangeCalendar
from .exchange_calendar_xasx import XASXExchangeCalendar
Expand Down Expand Up @@ -68,6 +69,7 @@
"ASEX": ASEXExchangeCalendar,
"BVMF": BVMFExchangeCalendar,
"CMES": CMESExchangeCalendar,
"EEX": EEXExchangeCalendar,
"IEPA": IEPAExchangeCalendar,
"XAMS": XAMSExchangeCalendar,
"XASX": XASXExchangeCalendar,
Expand Down
64 changes: 64 additions & 0 deletions exchange_calendars/exchange_calendar_eex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from datetime import time
from zoneinfo import ZoneInfo

from pandas.tseries.holiday import EasterMonday, GoodFriday

from .common_holidays import (
boxing_day,
christmas,
christmas_eve,
european_labour_day,
new_years_day,
new_years_eve,
)
from .exchange_calendar import HolidayCalendar, ExchangeCalendar

NewYearsDay = new_years_day()
LabourDay = european_labour_day()
ChristmasEve = christmas_eve()
Christmas = christmas()
BoxingDay = boxing_day()
NewYearsEve = new_years_eve()


class EEXExchangeCalendar(ExchangeCalendar):
"""
Calendar for the European Energy Exchange AG, Leipzig, Germany.
https://www.eex.com/fileadmin/EEX/Downloads/Trading/Calendar/Holiday_Calendar/20230303_Trading_Calendar_EEX_Group.pdf

Open Time: 9:00 AM, CET (Central European Time)
Close Time: 5:30 PM, CET (Central European Time)

Regularly-Observed Holidays:
- New Year's Day
- Good Friday
- Easter Monday
- Labour Day
- Christmas Eve
- Christmas Day
- Boxing Day
- New Year's Eve
"""

name = "EEX"

tz = ZoneInfo("Europe/Berlin")

open_times = ((None, time(9)),)

close_times = ((None, time(17, 30)),)

@property
def regular_holidays(self):
return HolidayCalendar(
[
NewYearsDay,
GoodFriday,
EasterMonday,
LabourDay,
ChristmasEve,
Christmas,
BoxingDay,
NewYearsEve,
]
)
Loading
Loading