Skip to content

Commit

Permalink
Merge pull request #40 from AlpacaDB/feature/fix-tse-trading-halt-day
Browse files Browse the repository at this point in the history
Feature/Add trading halt day to XTKS calendar
  • Loading branch information
sercant authored Apr 19, 2022
2 parents 94e4a08 + dd22961 commit 7d6c0bd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]
python-version: [2.7, 3.5, 3.8, 3.9]
include:
- python-version: 2.7
Expand Down
1 change: 0 additions & 1 deletion tests/resources/xtks.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5085,7 +5085,6 @@
2020-09-28,2020-09-28 00:01:00,2020-09-28 06:00:00
2020-09-29,2020-09-29 00:01:00,2020-09-29 06:00:00
2020-09-30,2020-09-30 00:01:00,2020-09-30 06:00:00
2020-10-01,2020-10-01 00:01:00,2020-10-01 06:00:00
2020-10-02,2020-10-02 00:01:00,2020-10-02 06:00:00
2020-10-05,2020-10-05 00:01:00,2020-10-05 06:00:00
2020-10-06,2020-10-06 00:01:00,2020-10-06 06:00:00
Expand Down
1 change: 1 addition & 0 deletions tests/test_xtks_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def test_2020(self):
pd.Timestamp("2020-08-10", tz=UTC), # Mountain Day
pd.Timestamp("2020-09-21", tz=UTC), # Respect for the Aged Day
pd.Timestamp("2020-09-22", tz=UTC), # Autumnal Equinox
pd.Timestamp("2020-10-01", tz=UTC), # JPX Trading Halt for TSE
pd.Timestamp("2020-11-03", tz=UTC), # Culture Day
pd.Timestamp("2020-11-23", tz=UTC), # Labor Thanksgiving Day
pd.Timestamp("2020-12-31", tz=UTC), # New Year's holiday
Expand Down
4 changes: 3 additions & 1 deletion trading_calendars/exchange_calendar_xtks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
LaborThanksgivingDay,
EmperorAkihitoBirthday,
EmperorNaruhitoBirthday,
Misc2019Holidays
Misc2019Holidays,
Misc2020Holidays
)


Expand Down Expand Up @@ -143,4 +144,5 @@ def adhoc_holidays(self):
AutumnalEquinoxes,
CitizensHolidaySilverWeek,
Misc2019Holidays,
Misc2020Holidays,
))
7 changes: 7 additions & 0 deletions trading_calendars/xtks_holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,10 @@ def sunday_to_wednesday(dt):
Timestamp('2019-05-02'), # Citizen's Holiday
Timestamp('2019-10-22'), # Enthronement Ceremony
]

Misc2020Holidays = [
# JPX: Trading halt due to system glitch. Reports:
# 1. https://www.jpx.co.jp/english/news/1030/20201001-04.html
# 2. https://www.jpx.co.jp/english/news/1030/20201001-05.html
Timestamp('2020-10-01'),
]

0 comments on commit 7d6c0bd

Please sign in to comment.