Repository: rsheftel/pandas_market_calendars

Issue:
Change in JPX Market Closing Time
## Update: JPX Market Closing Time

### Summary
The closing market time for JPX has been extended to 15:30 PM (local time). The current version doesn't resolve for the change.

Test code:
```python
# test.py
import pandas_market_calendars as mcal

calendar = mcal.get_calendar("XJPX")

schedule = calendar.schedule(
    start_date="2024-10-25", end_date="2024-11-07", tz="Asia/Tokyo"
)
print(f"version: {mcal.__version__}")
print(schedule)
```

Output:
```console
~$python ./test.py
version: 4.4.1
                         market_open               break_start                 break_end              market_close
2024-10-25 2024-10-25 09:00:00+09:00 2024-10-25 11:30:00+09:00 2024-10-25 12:30:00+09:00 2024-10-25 15:00:00+09:00
2024-10-28 2024-10-28 09:00:00+09:00 2024-10-28 11:30:00+09:00 2024-10-28 12:30:00+09:00 2024-10-28 15:00:00+09:00
2024-10-29 2024-10-29 09:00:00+09:00 2024-10-29 11:30:00+09:00 2024-10-29 12:30:00+09:00 2024-10-29 15:00:00+09:00
2024-10-30 2024-10-30 09:00:00+09:00 2024-10-30 11:30:00+09:00 2024-10-30 12:30:00+09:00 2024-10-30 15:00:00+09:00
2024-10-31 2024-10-31 09:00:00+09:00 2024-10-31 11:30:00+09:00 2024-10-31 12:30:00+09:00 2024-10-31 15:00:00+09:00
2024-11-01 2024-11-01 09:00:00+09:00 2024-11-01 11:30:00+09:00 2024-11-01 12:30:00+09:00 2024-11-01 15:00:00+09:00
2024-11-05 2024-11-05 09:00:00+09:00 2024-11-05 11:30:00+09:00 2024-11-05 12:30:00+09:00 2024-11-05 15:00:00+09:00
2024-11-06 2024-11-06 09:00:00+09:00 2024-11-06 11:30:00+09:00 2024-11-06 12:30:00+09:00 2024-11-06 15:00:00+09:00
2024-11-07 2024-11-07 09:00:00+09:00 2024-11-07 11:30:00+09:00 2024-11-07 12:30:00+09:00 2024-11-07 15:00:00+09:00
```

### Additional Information
- **Previous Closing Time:** 15:00 PM (local time)
- **New Closing Time:** 15:30 PM (local time)
- References:
  - [JPX: Trading Rules of Domestic Stocks](https://www.jpx.co.jp/english/equities/trading/domestic/01.html#:~:text=Auction%20trading%20period%20is%20divided,05%20pm%20for%20each%20session.&text=Following%20days%20are%20holidays.)
  - [Notice of the transition](https://www.jpx.co.jp/english/equities/trading/domestic/tvdivq0000006blj-att/tradinghours_eg.pdf)

Thank you for your attention to this update!

Hints from issue comments:
@rsheftel: Thank you for the update. If you want to submit a PR that would be great. If not I will definitely get to it when I have time.@rsheftel: Resolved by PR #351 

Solution patch:
diff --git a/pandas_market_calendars/calendars/jpx.py b/pandas_market_calendars/calendars/jpx.py
index 62d7aef..c371095 100644
--- a/pandas_market_calendars/calendars/jpx.py
+++ b/pandas_market_calendars/calendars/jpx.py
@@ -21,13 +21,17 @@ class JPXExchangeCalendar(MarketCalendar):
 
     Open Time: 9:31 AM, Asia/Tokyo
     LUNCH BREAK :facepalm: : 11:30 AM - 12:30 PM Asia/Tokyo
-    Close Time: 4:00 PM, Asia/Tokyo
+    Close Time: 3:30 PM, Asia/Tokyo
+
+    Market close of Japan changed from 3:00 PM to 3:30 PM on November 5, 2024
+    Reference:
+    https://www.jpx.co.jp/english/equities/trading/domestic/tvdivq0000006blj-att/tradinghours_eg.pdf
     """
 
     aliases = ["JPX", "XJPX"]
     regular_market_times = {
         "market_open": ((None, time(9)),),
-        "market_close": ((None, time(15)),),
+        "market_close": ((None, time(15)), ("2024-11-05", time(15, 30))),
         "break_start": ((None, time(11, 30)),),
         "break_end": ((None, time(12, 30)),),
     }


Test patch:
diff --git a/tests/test_jpx_calendar.py b/tests/test_jpx_calendar.py
index efabfd2..5dc2fb9 100644
--- a/tests/test_jpx_calendar.py
+++ b/tests/test_jpx_calendar.py
@@ -267,3 +267,37 @@ def test_jpx_trading_days_since_1949(request):
     actual = pd.date_range(start_date, end_date, freq=day_generator)
 
     assert_index_equal(expected, actual)
+
+
+def test_jpx_change_in_market_close():
+    """
+    The market close of Japan changed from 3:00 PM to 3:30 PM on November 5, 2024, make sure the
+    calendar reflects this change.
+    """
+    jpx_calendar = JPXExchangeCalendar()
+    jpx_schedule = jpx_calendar.schedule(start_date="2024-10-28", end_date="2024-11-08")
+
+    business_dates_before_change = [
+        "2024-10-28",
+        "2024-10-29",
+        "2024-10-30",
+        "2024-10-31",
+        "2024-11-01",
+    ]
+
+    business_dates_after_change = [
+        "2024-11-05",
+        "2024-11-06",
+        "2024-11-07",
+        "2024-11-08",
+    ]
+
+    for date in business_dates_before_change:
+        assert jpx_schedule.loc[date, "market_close"] == pd.Timestamp(
+            f"{date} 15:00", tz="Asia/Tokyo"
+        )
+
+    for date in business_dates_after_change:
+        assert jpx_schedule.loc[date, "market_close"] == pd.Timestamp(
+            f"{date} 15:30", tz="Asia/Tokyo"
+        )