Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,13 @@ code when available. The following financial markets are available:
<td></td>
</tr>
<tr>
<td>SIX Swiss Exchange</td>
<td>XSWX</td>
<td>SIX Swiss Exchange market holidays</td>
<td><strong>de</strong>, en_US, fr, it, th, uk</td>
<td></td>
</tr>
<tr>
<td>Toronto Stock Exchange</td>
<td>XTSE</td>
<td>Toronto Stock Exchange (TSX) market holidays</td>
Expand Down
1 change: 1 addition & 0 deletions holidays/financial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
from holidays.financial.ny_stock_exchange import NewYorkStockExchange, XNYS, NYSE
from holidays.financial.shanghai_stock_exchange import ShanghaiStockExchange, XSHG, SSE
from holidays.financial.shenzhen_stock_exchange import ShenzhenStockExchange, XSHE, SZSE
from holidays.financial.six_swiss_exchange import SIXSwissExchange, XSWX, SIX
from holidays.financial.toronto_stock_exchange import TorontoStockExchange, XTSE, TSX
69 changes: 69 additions & 0 deletions holidays/financial/six_swiss_exchange.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)

from gettext import gettext as tr

from holidays.constants import PUBLIC
from holidays.countries.switzerland import Switzerland
from holidays.mixins.child_entity import ChildEntity
from holidays.observed_holiday_base import SAT_TO_NONE, SUN_TO_NONE


class SIXSwissExchange(ChildEntity, Switzerland): # type: ignore[assignment, misc]
Comment thread
KJhellico marked this conversation as resolved.
Outdated
"""SIX Swiss Exchange holidays.
Comment thread
KJhellico marked this conversation as resolved.
Outdated

References:
[2018](https://web.archive.org/web/20260712044834/https://www.six-group.com/dam/download/sites/education/preparatory-documentation/trading-module/trading-guide.pdf)
[2019](https://web.archive.org/web/20260712044834/https://www.six-group.com/dam/download/sites/education/preparatory-documentation/trading-module/trading-guide.pdf)
Comment thread
KJhellico marked this conversation as resolved.
[2022](https://web.archive.org/web/20220420104843/https://www.six-group.com/dam/download/the-swiss-stock-exchange/trading/trading-provisions/regulation/trading-guides/trading-calendar-2022.pdf)
[2023](https://web.archive.org/web/20220626051815/https://www.six-group.com/dam/download/the-swiss-stock-exchange/trading/trading-provisions/regulation/trading-guides/trading-calendar-2023.pdf)
[2024](https://web.archive.org/web/20240910205011/https://www.six-group.com/en/market-data/news-tools/trading-currency-holiday-calendar.html#/#/)
Comment thread
KJhellico marked this conversation as resolved.
Outdated
[2025](https://web.archive.org/web/20250908065713/https://www.six-group.com/dam/download/the-swiss-stock-exchange/trading/trading-provisions/regulation/trading-guides/trading-calendar-2025.pdf)
[2026](https://web.archive.org/web/20251225182641/https://www.six-group.com/dam/download/the-swiss-stock-exchange/trading/trading-provisions/regulation/trading-guides/trading-calendar-2026.pdf)
"""

country = None # type: ignore[assignment]
market = "XSWX"
parent_entity = Switzerland
parent_entity_subdivision_code = "ZH"
supported_categories = (PUBLIC,) # type: ignore[assignment]
Comment thread
KJhellico marked this conversation as resolved.
Outdated
start_year = 2000

_weekend_to_none_rule = SAT_TO_NONE + SUN_TO_NONE

def _populate_public_holidays(self) -> None:
super()._populate_public_holidays()

# Saint Berchtold's Day
self._add_new_years_day_two(tr("Berchtoldstag"))

# Christmas Eve.
self._add_christmas_eve(tr("Heiligabend"))

# New Year's Eve.
self._add_new_years_eve(tr("Vortag vor Neujahr"))

def _populate(self, year: int) -> None:
super()._populate(year)

if self.observed:
for dt in tuple(self.keys()):
if dt.year == year:
self._move_holiday_forced(dt, rule=self._weekend_to_none_rule)
Comment thread
KJhellico marked this conversation as resolved.
Outdated


class XSWX(SIXSwissExchange):
pass


class SIX(SIXSwissExchange):
pass
40 changes: 40 additions & 0 deletions holidays/locale/de/LC_MESSAGES/XSWX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# SIX Swiss Exchange holidays.
Comment thread
KJhellico marked this conversation as resolved.
Outdated
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.101\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-11 00:25+0000\n"
"PO-Revision-Date: 2026-07-12 12:10+0000\n"
"Last-Translator: Paresh Joshi <pareshjoshij@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: de\n"

#. Saint Berchtold's Day
msgid "Berchtoldstag"
msgstr ""
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

#. Christmas Eve.
msgid "Heiligabend"
msgstr ""

#. New Year's Eve.
msgid "Vortag vor Neujahr"
msgstr ""
40 changes: 40 additions & 0 deletions holidays/locale/en_US/LC_MESSAGES/XSWX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# SIX Swiss Exchange holidays en_US localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.101\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-11 00:25+0000\n"
"PO-Revision-Date: 2026-07-12 12:10+0000\n"
"Last-Translator: Paresh Joshi <pareshjoshij@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: de\n"

#. Saint Berchtold's Day
msgid "Berchtoldstag"
msgstr "Saint Berchtold's Day"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

#. Christmas Eve.
msgid "Heiligabend"
msgstr "Christmas Eve"

#. New Year's Eve.
msgid "Vortag vor Neujahr"
msgstr "New Year's Eve"
40 changes: 40 additions & 0 deletions holidays/locale/fr/LC_MESSAGES/XSWX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# SIX Swiss Exchange holidays fr localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.101\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-11 00:25+0000\n"
"PO-Revision-Date: 2026-07-12 12:10+0000\n"
"Last-Translator: Paresh Joshi <194076591+pareshjoshij@users.noreply.github.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: de\n"

#. Saint Berchtold's Day
msgid "Berchtoldstag"
msgstr "Saint-Berchtold"

#. Christmas Eve.
msgid "Heiligabend"
msgstr "Veille de Noël"

#. New Year's Eve.
msgid "Vortag vor Neujahr"
msgstr "Réveillon de la Saint-Sylvestre"
40 changes: 40 additions & 0 deletions holidays/locale/it/LC_MESSAGES/XSWX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# SIX Swiss Exchange holidays it localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.101\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-11 00:25+0000\n"
"PO-Revision-Date: 2026-07-12 12:10+0000\n"
"Last-Translator: Paresh Joshi <pareshjoshij@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: de\n"

#. Saint Berchtold's Day
msgid "Berchtoldstag"
msgstr "Giorno di Bertoldo"

#. Christmas Eve.
msgid "Heiligabend"
msgstr "Vigilia di Natale"

#. New Year's Eve.
msgid "Vortag vor Neujahr"
msgstr "Vigilia di Capodanno"
40 changes: 40 additions & 0 deletions holidays/locale/th/LC_MESSAGES/XSWX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# SIX Swiss Exchange holidays th localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.101\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-11 00:25+0000\n"
"PO-Revision-Date: 2026-07-12 12:10+0000\n"
"Last-Translator: Paresh Joshi <pareshjoshij@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: th\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: de\n"

#. Saint Berchtold's Day
msgid "Berchtoldstag"
msgstr "วันสมโภชนักบุญแบร์กโทลด์"

#. Christmas Eve.
msgid "Heiligabend"
msgstr "วันคริสต์มาสอีฟ"

#. New Year's Eve.
msgid "Vortag vor Neujahr"
msgstr "วันส่งท้ายปีเก่า"
Comment thread
PPsyrius marked this conversation as resolved.
Outdated
40 changes: 40 additions & 0 deletions holidays/locale/uk/LC_MESSAGES/XSWX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# SIX Swiss Exchange holidays uk localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.101\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-11 00:25+0000\n"
"PO-Revision-Date: 2026-07-12 12:10+0000\n"
"Last-Translator: Paresh Joshi <pareshjoshij@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: de\n"

#. Saint Berchtold's Day
msgid "Berchtoldstag"
msgstr "День Святого Бертольда"

#. Christmas Eve.
msgid "Heiligabend"
msgstr "Святвечір"

#. New Year's Eve.
msgid "Vortag vor Neujahr"
msgstr "Переддень Нового року"
1 change: 1 addition & 0 deletions holidays/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
"ny_stock_exchange": ("NewYorkStockExchange", "XNYS", "NYSE"),
"shanghai_stock_exchange": ("ShanghaiStockExchange", "XSHG", "SSE"),
"shenzhen_stock_exchange": ("ShenzhenStockExchange", "XSHE", "SZSE"),
"six_swiss_exchange": ("SIXSwissExchange", "XSWX", "SIX"),
"toronto_stock_exchange": ("TorontoStockExchange", "XTSE", "TSX"),
}

Expand Down
Loading