Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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 CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Douglas Franklin
Eden Juscelino
Edison Robles
Edward Betts
Eesh Saxena
Eldar Mustafayev
Emmanuel Arias
Eugenio Panadero Maciá
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1994,6 +1994,13 @@ code when available. The following financial markets are available:
<td></td>
</tr>
<tr>
<td>London Stock Exchange</td>
<td>XLON</td>
<td>London Stock Exchange (LSE) market holidays</td>
<td><strong>en_GB</strong>, en_US, th</td>
<td>HALF_DAY</td>
</tr>
<tr>
<td>NASDAQ</td>
<td>XNAS</td>
<td>National Association of Securities Dealers Automated Quotations (NASDAQ) holidays</td>
Expand Down
3 changes: 2 additions & 1 deletion holidays/countries/united_kingdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from gettext import gettext as tr

from holidays.calendars.gregorian import APR, MAY, JUN, JUL, SEP, DEC
from holidays.constants import PUBLIC
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
from holidays.observed_holiday_base import (
ObservedHolidayBase,
Expand Down Expand Up @@ -104,7 +105,7 @@ def _populate_common(self):
self._add_whit_monday(tr("Whit Monday"))

def _populate_subdiv_holidays(self):
if self.subdiv != "SCT":
if PUBLIC in self.categories and self.subdiv != "SCT":
if self._year >= 1975:
# New Year's Day.
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
Expand Down
1 change: 1 addition & 0 deletions holidays/financial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from holidays.financial.hong_kong_stock_exchange import HongKongStockExchange, XHKG, HKEX, SEHK
from holidays.financial.ice_futures_europe import IceFuturesEurope, ICEFuturesEurope, IFEU
from holidays.financial.japan_exchange import JapanExchange, XJPX, JPX, TSE, OSE
from holidays.financial.london_stock_exchange import LondonStockExchange, XLON, LSE
from holidays.financial.nasdaq import NASDAQ, XNAS
from holidays.financial.national_stock_exchange_of_india import (
NationalStockExchangeOfIndia,
Expand Down
66 changes: 66 additions & 0 deletions holidays/financial/london_stock_exchange.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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 HALF_DAY, PUBLIC
from holidays.countries.united_kingdom import UnitedKingdom
from holidays.mixins.child_entity import ChildEntity


class LondonStockExchange(ChildEntity, UnitedKingdom):
"""London Stock Exchange holidays.

The London Stock Exchange (LSE) is closed on the bank holidays observed in
England and Wales, so its public holidays are an alias of the England
(``ENG``) subdivision of the United Kingdom, including the one-off royal
bank holidays.

On Christmas Eve and New Year's Eve the exchange runs a shortened trading
session (a half-day closing), available under the ``HALF_DAY`` category.
Comment thread
KJhellico marked this conversation as resolved.
Outdated

References:
* <https://en.wikipedia.org/wiki/London_Stock_Exchange>
* <https://en.wikipedia.org/wiki/Bank_holiday>
* [LSE business days](https://www.londonstockexchange.com/equities-trading/business-days)
"""

country = None # type: ignore[assignment]
market = "XLON"
parent_entity = UnitedKingdom
parent_entity_subdivision_code = "ENG"
supported_categories = (HALF_DAY, PUBLIC)
start_year = 2000
Comment on lines +37 to +41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eeshsaxena the LSE also observes early closures/half days (like Christmas Eve and New Year's Eve). Here is the reference link

​We will need to add half-day support to make this fully accurate. I've already done the research on this, so I am happy to help you implement this section if you'd like! Just let me know


def _populate_half_day_holidays(self):
# On these days the exchange runs a shortened session (a 12:30 close),
# exposed here under the HALF_DAY category with a label so end users can
# tell it apart from a full market holiday.

# %s (half-day closing).
half_day_closing_label = tr("%s (half-day closing)")

# Christmas Eve.
christmas_eve = self._format_holiday_name(half_day_closing_label, tr("Christmas Eve"))
self._add_christmas_eve(christmas_eve)

# New Year's Eve.
new_years_eve = self._format_holiday_name(half_day_closing_label, tr("New Year's Eve"))
self._add_new_years_eve(new_years_eve)
Comment thread
KJhellico marked this conversation as resolved.
Outdated
Comment thread
KJhellico marked this conversation as resolved.
Outdated


class XLON(LondonStockExchange):
pass


class LSE(LondonStockExchange):
pass
41 changes: 41 additions & 0 deletions holidays/locale/en_GB/LC_MESSAGES/XLON.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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)
#
# London Stock Exchange holidays.
Comment thread
KJhellico marked this conversation as resolved.
Outdated
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.100\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-05 09:48+0530\n"
"PO-Revision-Date: 2026-07-05 09:48+0530\n"
"Last-Translator: eeshsaxena <eeshsaxena@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: en_GB\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: en_GB\n"

#. %s (half-day closing).
#, c-format
msgid "%s (half-day closing)"
msgstr ""

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

#. New Year's Eve.
msgid "New Year's Eve"
msgstr ""
41 changes: 41 additions & 0 deletions holidays/locale/en_US/LC_MESSAGES/XLON.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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)
#
# London Stock Exchange holidays en_US localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.100\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-05 09:48+0530\n"
"PO-Revision-Date: 2026-07-05 09:48+0530\n"
"Last-Translator: eeshsaxena <eeshsaxena@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: en_GB\n"

#. %s (half-day closing).
#, c-format
msgid "%s (half-day closing)"
msgstr "%s (half-day closing)"

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

#. New Year's Eve.
msgid "New Year's Eve"
msgstr "New Year's Eve"
41 changes: 41 additions & 0 deletions holidays/locale/th/LC_MESSAGES/XLON.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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)
#
# London Stock Exchange holidays th localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.100\n"
"Report-Msgid-Bugs-To: l10n@vacanza.dev\n"
"POT-Creation-Date: 2026-07-05 09:48+0530\n"
"PO-Revision-Date: 2026-07-05 09:48+0530\n"
"Last-Translator: eeshsaxena <eeshsaxena@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: en_GB\n"

#. %s (half-day closing).
#, c-format
msgid "%s (half-day closing)"
msgstr "%s (ปิดครึ่งวัน)"

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

#. New Year's Eve.
msgid "New Year's Eve"
msgstr "วันสิ้นปี"
1 change: 1 addition & 0 deletions holidays/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
"hong_kong_stock_exchange": ("HongKongStockExchange", "XHKG", "HKEX", "SEHK"),
"ice_futures_europe": ("IceFuturesEurope", "IFEU", "ICEFuturesEurope"),
"japan_exchange": ("JapanExchange", "XJPX", "JPX", "TSE", "OSE"),
"london_stock_exchange": ("LondonStockExchange", "XLON", "LSE"),
"nasdaq": ("NASDAQ", "XNAS"),
"national_stock_exchange_of_india": ("NationalStockExchangeOfIndia", "XNSE", "NSE"),
"ny_stock_exchange": ("NewYorkStockExchange", "XNYS", "NYSE"),
Expand Down
Loading