Skip to content

Commit

Permalink
Align financial markets MIC codes with ISO 10383 (#2158)
Browse files Browse the repository at this point in the history
Co-authored-by: Arkadii Yakovets <[email protected]>
  • Loading branch information
KJhellico and arkid15r authored Dec 6, 2024
1 parent 90db249 commit 5f37ecc
Show file tree
Hide file tree
Showing 11 changed files with 261 additions and 141 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,12 @@ following financial markets are available:
- Code
- Info
- Supported Languages
* - Brasil, Bolsa, Balcão
- BVMF
- Brazil Stock Exchange and Over-the-Counter Market holidays (same as ANBIMA holidays)
- en_US, **pt_BR**, uk
* - European Central Bank
- ECB
- XECB
- Trans-European Automated Real-time Gross Settlement (TARGET2)
-
* - ICE Futures Europe
Expand All @@ -992,10 +996,6 @@ following financial markets are available:
- XNYS
- NYSE market holidays (used by all other US-exchanges, including NASDAQ, etc.)
-
* - Brasil, Bolsa, Balcão
- BVMF
- Brazil Stock Exchange and Over-the-Counter Market holidays (same as ANBIMA holidays)
- en_US, **pt_BR**, uk


Contributions
Expand Down
4 changes: 2 additions & 2 deletions holidays/financial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# flake8: noqa: F401

from .brasil_bolsa_balcao import BrasilBolsaBalcao, BVMF, B3
from .european_central_bank import EuropeanCentralBank, ECB, TAR
from .european_central_bank import EuropeanCentralBank, XECB, ECB, TAR
from .ice_futures_europe import ICEFuturesEurope, IFEU
from .ny_stock_exchange import NewYorkStockExchange, NYSE, XNYS
from .ny_stock_exchange import NewYorkStockExchange, XNYS, NYSE
13 changes: 10 additions & 3 deletions holidays/financial/european_central_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ class EuropeanCentralBank(HolidayBase, ChristianHolidays, InternationalHolidays)
"""
References:
- https://en.wikipedia.org/wiki/TARGET2
- https://www.ecb.europa.eu/ecb/contacts/working-hours/html/index.en.html
- https://www.ecb.europa.eu/press/pr/date/1999/html/pr990715_1.en.html
- https://www.ecb.europa.eu/press/pr/date/2000/html/pr001214_4.en.html
"""

market = "ECB"
market = "XECB"
start_year = 2000

def __init__(self, *args, **kwargs):
Expand All @@ -36,12 +37,18 @@ def _populate_public_holidays(self):
self._add_new_years_day("New Year's Day")

self._add_good_friday("Good Friday")

self._add_easter_monday("Easter Monday")

self._add_labor_day("1 May (Labour Day)")
self._add_labor_day("Labour Day")

self._add_christmas_day("Christmas Day")
self._add_christmas_day_two("26 December")

self._add_christmas_day_two("Christmas Holiday")


class XECB(EuropeanCentralBank):
pass


class ECB(EuropeanCentralBank):
Expand Down
2 changes: 1 addition & 1 deletion holidays/financial/ny_stock_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class NewYorkStockExchange(
- https://web.archive.org/web/20211101162021/https://www.nyse.com/markets/hours-calendars
"""

market = "NYSE"
market = "XNYS"
observed_label = "%s (observed)"
start_year = 1863

Expand Down
4 changes: 2 additions & 2 deletions holidays/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@
}

FINANCIAL: RegistryDict = {
"european_central_bank": ("EuropeanCentralBank", "ECB", "TAR"),
"european_central_bank": ("EuropeanCentralBank", "XECB", "ECB", "TAR"),
"ice_futures_europe": ("ICEFuturesEurope", "IFEU"),
"ny_stock_exchange": ("NewYorkStockExchange", "NYSE", "XNYS"),
"ny_stock_exchange": ("NewYorkStockExchange", "XNYS", "NYSE"),
"brasil_bolsa_balcao": ("BrasilBolsaBalcao", "BVMF", "B3"),
}

Expand Down
Loading

0 comments on commit 5f37ecc

Please sign in to comment.