Skip to content

Commit

Permalink
Merge pull request #4 from AlpacaDB/feature/add-trading-halt-day-to-XTKS
Browse files Browse the repository at this point in the history
Add trading halt day to XTKS calendar
  • Loading branch information
saubhik authored Oct 1, 2020
2 parents 6d6d1cd + 25b078a commit e73d56b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
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 @@ -42,7 +42,8 @@
LaborThanksgivingDay,
EmperorAkihitoBirthday,
EmperorNaruhitoBirthday,
Misc2019Holidays
Misc2019Holidays,
Misc2020Holidays
)


Expand Down Expand Up @@ -137,4 +138,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 @@ -338,3 +338,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 e73d56b

Please sign in to comment.