Skip to content

Commit

Permalink
Add Luxembourg stock exchange, XLUX (#446)
Browse files Browse the repository at this point in the history
Adds Luxembourg stock exchange, XLUX.
  • Loading branch information
w3stling authored Jan 14, 2025
1 parent e8ea481 commit 1e54cb8
Show file tree
Hide file tree
Showing 5 changed files with 6,832 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ 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 | XEEE | Germany | 4.5.5 | https://www.eex.com |
| Hamburg Stock Exchange | XHAM | Germany | 4.5.5 | https://www.boerse-hamburg.de |
| Duesseldorf Stock Exchange | XDUS | Germany | 4.5.5 | https://www.boerse-duesseldorf.de |
| European Energy Exchange AG | XEEE | Germany | 4.5.5 | https://www.eex.com |
| Hamburg Stock Exchange | XHAM | Germany | 4.5.5 | https://www.boerse-hamburg.de |
| Duesseldorf Stock Exchange | XDUS | Germany | 4.5.5 | https://www.boerse-duesseldorf.de |
| Luxembourg Stock Exchange | XLUX | Luxembourg | 4.8 | https://www.luxse.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
3 changes: 3 additions & 0 deletions exchange_calendars/calendar_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from .exchange_calendar_xlim import XLIMExchangeCalendar
from .exchange_calendar_xlis import XLISExchangeCalendar
from .exchange_calendar_xlon import XLONExchangeCalendar
from .exchange_calendar_xlux import XLUXExchangeCalendar
from .exchange_calendar_xmad import XMADExchangeCalendar
from .exchange_calendar_xmex import XMEXExchangeCalendar
from .exchange_calendar_xmil import XMILExchangeCalendar
Expand Down Expand Up @@ -99,6 +100,7 @@
"XLIM": XLIMExchangeCalendar,
"XLIS": XLISExchangeCalendar,
"XLON": XLONExchangeCalendar,
"XLUX": XLUXExchangeCalendar,
"XMAD": XMADExchangeCalendar,
"XMEX": XMEXExchangeCalendar,
"XMIL": XMILExchangeCalendar,
Expand Down Expand Up @@ -157,6 +159,7 @@
"SSE": "XSHG",
"TASE": "XTAE",
"BVB": "XBSE",
"LUXSE": "XLUX",
}

default_calendar_names = sorted(_default_calendar_factories.keys())
Expand Down
78 changes: 78 additions & 0 deletions exchange_calendars/exchange_calendar_xlux.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
from datetime import time
from zoneinfo import ZoneInfo

from pandas.tseries.holiday import EasterMonday, GoodFriday

from .exchange_calendar import WEEKDAYS, HolidayCalendar, ExchangeCalendar

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

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


class XLUXExchangeCalendar(ExchangeCalendar):
"""
Exchange calendar for the Luxembourg Stock Exchange (XLUX).
Open Time: 9:00 AM, CET
Close Time: 5:40 PM, CET
Regularly-Observed Holidays:
- New Years Day
- Good Friday
- Easter Monday
- Labour Day
- Christmas Day
- Boxing Day
Early Closes:
- Christmas Eve
- New Year's Eve
"""

# Source: https://www.luxse.com/trading/opening-hours-and-closing-days

name = "XLUX" # Luxembourg Stock Exchange
tz = ZoneInfo("Europe/Luxembourg")
open_times = ((None, time(9, 0)),)
close_times = ((None, time(17, 40)),)
regular_early_close = time(14, 5)

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

@property
def special_closes(self):
return [
(
self.regular_early_close,
HolidayCalendar(
[
ChristmasEve,
NewYearsEve,
]
),
)
]
Loading

0 comments on commit 1e54cb8

Please sign in to comment.