pandas-market-calendars 4.4.1__tar.gz → 4.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pandas_market_calendars-4.4.1/pandas_market_calendars.egg-info → pandas_market_calendars-4.5.0}/PKG-INFO +2 -1
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/jpx.py +6 -2
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/nyse.py +3 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/nyse.py +5 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/market_calendar.py +20 -1
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0/pandas_market_calendars.egg-info}/PKG-INFO +2 -1
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pyproject.toml +2 -1
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_jpx_calendar.py +34 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_nyse_calendar_early_years.py +1 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/LICENSE +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/NOTICE +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/README.rst +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/__init__.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendar_registry.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendar_utils.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/__init__.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/asx.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/bmf.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/bse.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cboe.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_agriculture.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_base.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_crypto.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_equities.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_fixed_income.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/cme_globex_fx.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/eurex.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/eurex_fixed_income.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/hkex.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/ice.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/iex.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/lse.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/mirror.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/ose.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/sifma.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/six.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/sse.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/tase.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/calendars/tsx.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/class_registry.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/__init__.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/cme.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/cme_globex.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/cn.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/jp.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/jpx_equinox.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/oz.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/sifma.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/uk.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/holidays/us.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars.egg-info/SOURCES.txt +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars.egg-info/dependency_links.txt +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars.egg-info/requires.txt +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars.egg-info/top_level.txt +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/setup.cfg +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_24_7_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_XNYS_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_asx_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_bmf_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_bse_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cboe_calendars.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_class_registry.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cme_agriculture_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cme_bond_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cme_equity_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_eurex_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_eurex_fixed_income_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_exchange_calendar_cme_globex_crypto.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_exchange_calendar_cme_globex_energy_and_metals.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_exchange_calendar_cme_globex_equities.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_exchange_calendar_cme_globex_fixed_income.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_exchange_calendar_cme_globex_fx.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_exchange_calendar_cme_globex_grains.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_hkex_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_ice_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_iex_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_lse_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_market_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_nyse_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_ose_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_sifma_calendars.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_six_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_sse_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_tsx_calendar.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_utils.py +0 -0
- {pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_xtae_calendar.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pandas_market_calendars
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.5.0
|
4
4
|
Summary: Market and exchange trading calendars for pandas
|
5
5
|
Author-email: Ryan Sheftel <rsheftel@alumni.upenn.edu>
|
6
6
|
License: MIT
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
21
22
|
Requires-Python: >=3.8
|
22
23
|
Description-Content-Type: text/x-rst
|
23
24
|
License-File: LICENSE
|
@@ -21,13 +21,17 @@ class JPXExchangeCalendar(MarketCalendar):
|
|
21
21
|
|
22
22
|
Open Time: 9:31 AM, Asia/Tokyo
|
23
23
|
LUNCH BREAK :facepalm: : 11:30 AM - 12:30 PM Asia/Tokyo
|
24
|
-
Close Time:
|
24
|
+
Close Time: 3:30 PM, Asia/Tokyo
|
25
|
+
|
26
|
+
Market close of Japan changed from 3:00 PM to 3:30 PM on November 5, 2024
|
27
|
+
Reference:
|
28
|
+
https://www.jpx.co.jp/english/equities/trading/domestic/tvdivq0000006blj-att/tradinghours_eg.pdf
|
25
29
|
"""
|
26
30
|
|
27
31
|
aliases = ["JPX", "XJPX"]
|
28
32
|
regular_market_times = {
|
29
33
|
"market_open": ((None, time(9)),),
|
30
|
-
"market_close": ((None, time(15)),),
|
34
|
+
"market_close": ((None, time(15)), ("2024-11-05", time(15, 30))),
|
31
35
|
"break_start": ((None, time(11, 30)),),
|
32
36
|
"break_end": ((None, time(12, 30)),),
|
33
37
|
}
|
@@ -297,6 +297,8 @@ from pandas_market_calendars.holidays.nyse import (
|
|
297
297
|
HurricaneSandyClosings2012,
|
298
298
|
# 2018
|
299
299
|
GeorgeHWBushDeath2018,
|
300
|
+
# 2025
|
301
|
+
JimmyCarterDeath2025,
|
300
302
|
)
|
301
303
|
from pandas_market_calendars.market_calendar import MarketCalendar
|
302
304
|
|
@@ -961,6 +963,7 @@ class NYSEExchangeCalendar(MarketCalendar):
|
|
961
963
|
September11Closings2001,
|
962
964
|
HurricaneSandyClosings2012,
|
963
965
|
GeorgeHWBushDeath2018,
|
966
|
+
JimmyCarterDeath2025,
|
964
967
|
)
|
965
968
|
)
|
966
969
|
|
@@ -625,7 +625,15 @@ class MarketCalendar(metaclass=MarketCalendarMeta):
|
|
625
625
|
|
626
626
|
def _tryholidays(self, cal, s, e):
|
627
627
|
try:
|
628
|
-
|
628
|
+
# If the Calendar is all single Observance Holidays then it is far
|
629
|
+
# more efficient to extract and return those dates
|
630
|
+
observed_dates = _all_single_observance_rules(cal)
|
631
|
+
if observed_dates is not None:
|
632
|
+
return pd.DatetimeIndex(
|
633
|
+
[date for date in observed_dates if s <= date <= e]
|
634
|
+
)
|
635
|
+
else:
|
636
|
+
return cal.holidays(s, e)
|
629
637
|
except ValueError:
|
630
638
|
return pd.DatetimeIndex([])
|
631
639
|
|
@@ -920,3 +928,14 @@ class MarketCalendar(metaclass=MarketCalendarMeta):
|
|
920
928
|
|
921
929
|
def __delitem__(self, key):
|
922
930
|
return self.remove_time(key)
|
931
|
+
|
932
|
+
|
933
|
+
def _is_single_observance(holiday):
|
934
|
+
"Returns the Date of the Holiday if it is only observed once, None otherwise."
|
935
|
+
return holiday.start_date if holiday.start_date == holiday.end_date else None
|
936
|
+
|
937
|
+
|
938
|
+
def _all_single_observance_rules(calendar):
|
939
|
+
"Returns a list of timestamps if the Calendar's Rules are all single observance holidays, None Otherwise"
|
940
|
+
observances = [_is_single_observance(rule) for rule in calendar.rules]
|
941
|
+
return observances if all(observances) else None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pandas_market_calendars
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.5.0
|
4
4
|
Summary: Market and exchange trading calendars for pandas
|
5
5
|
Author-email: Ryan Sheftel <rsheftel@alumni.upenn.edu>
|
6
6
|
License: MIT
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
21
22
|
Requires-Python: >=3.8
|
22
23
|
Description-Content-Type: text/x-rst
|
23
24
|
License-File: LICENSE
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "pandas_market_calendars"
|
3
|
-
version = "4.
|
3
|
+
version = "4.5.0"
|
4
4
|
authors = [
|
5
5
|
{ name = "Ryan Sheftel", email = "rsheftel@alumni.upenn.edu" },
|
6
6
|
]
|
@@ -21,6 +21,7 @@ classifiers = [
|
|
21
21
|
'Programming Language :: Python :: 3.10',
|
22
22
|
'Programming Language :: Python :: 3.11',
|
23
23
|
'Programming Language :: Python :: 3.12',
|
24
|
+
'Programming Language :: Python :: 3.13',
|
24
25
|
]
|
25
26
|
dependencies = ['pandas>=1.1', 'pytz', 'python-dateutil', 'exchange-calendars>=3.3']
|
26
27
|
|
@@ -267,3 +267,37 @@ def test_jpx_trading_days_since_1949(request):
|
|
267
267
|
actual = pd.date_range(start_date, end_date, freq=day_generator)
|
268
268
|
|
269
269
|
assert_index_equal(expected, actual)
|
270
|
+
|
271
|
+
|
272
|
+
def test_jpx_change_in_market_close():
|
273
|
+
"""
|
274
|
+
The market close of Japan changed from 3:00 PM to 3:30 PM on November 5, 2024, make sure the
|
275
|
+
calendar reflects this change.
|
276
|
+
"""
|
277
|
+
jpx_calendar = JPXExchangeCalendar()
|
278
|
+
jpx_schedule = jpx_calendar.schedule(start_date="2024-10-28", end_date="2024-11-08")
|
279
|
+
|
280
|
+
business_dates_before_change = [
|
281
|
+
"2024-10-28",
|
282
|
+
"2024-10-29",
|
283
|
+
"2024-10-30",
|
284
|
+
"2024-10-31",
|
285
|
+
"2024-11-01",
|
286
|
+
]
|
287
|
+
|
288
|
+
business_dates_after_change = [
|
289
|
+
"2024-11-05",
|
290
|
+
"2024-11-06",
|
291
|
+
"2024-11-07",
|
292
|
+
"2024-11-08",
|
293
|
+
]
|
294
|
+
|
295
|
+
for date in business_dates_before_change:
|
296
|
+
assert jpx_schedule.loc[date, "market_close"] == pd.Timestamp(
|
297
|
+
f"{date} 15:00", tz="Asia/Tokyo"
|
298
|
+
)
|
299
|
+
|
300
|
+
for date in business_dates_after_change:
|
301
|
+
assert jpx_schedule.loc[date, "market_close"] == pd.Timestamp(
|
302
|
+
f"{date} 15:30", tz="Asia/Tokyo"
|
303
|
+
)
|
@@ -3995,6 +3995,7 @@ def test_2025():
|
|
3995
3995
|
end = "2025-12-31"
|
3996
3996
|
holidays = [
|
3997
3997
|
pd.Timestamp("2025-01-01", tz="UTC"),
|
3998
|
+
pd.Timestamp("2025-01-09", tz="UTC"),
|
3998
3999
|
pd.Timestamp("2025-01-20", tz="UTC"),
|
3999
4000
|
pd.Timestamp("2025-02-17", tz="UTC"),
|
4000
4001
|
pd.Timestamp("2025-04-18", tz="UTC"),
|
File without changes
|
File without changes
|
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/pandas_market_calendars/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cboe_calendars.py
RENAMED
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_class_registry.py
RENAMED
File without changes
|
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cme_bond_calendar.py
RENAMED
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_cme_equity_calendar.py
RENAMED
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_eurex_calendar.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_market_calendar.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{pandas_market_calendars-4.4.1 → pandas_market_calendars-4.5.0}/tests/test_sifma_calendars.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|