Skip to content

Commit

Permalink
Merge pull request #108 from pkim81/add-2020-holidays-to-xkrx
Browse files Browse the repository at this point in the history
added 2020 holidays to xkrx exchange
  • Loading branch information
jmccorriston authored Jan 6, 2020
2 parents 08d50d7 + 79c4db7 commit bb978bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/test_xkrx_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_normal_year(self):
self.assertNotIn(session_label, self.calendar.all_sessions)

def test_constrain_construction_dates(self):
# the XKRX calendar currently goes from 1986 to 2019, inclusive.
# the XKRX calendar currently goes from 1986 to 2020, inclusive.
with self.assertRaises(ValueError) as e:
self.calendar_class(T('1985-12-31'), T('2005-01-01'))

Expand All @@ -53,13 +53,13 @@ def test_constrain_construction_dates(self):
)

with self.assertRaises(ValueError) as e:
self.calendar_class(T('2005-01-01'), T('2020-01-01'))
self.calendar_class(T('2005-01-01'), T('2021-01-01'))

self.assertEqual(
str(e.exception),
(
'The XKRX holidays are only recorded to 2019,'
' cannot instantiate the XKRX calendar for 2020.'
'The XKRX holidays are only recorded to 2020,'
' cannot instantiate the XKRX calendar for 2021.'
)
)

Expand Down
15 changes: 14 additions & 1 deletion trading_calendars/exchange_calendar_xkrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,20 @@
"2019-10-03",
"2019-10-09",
"2019-12-25",
"2019-12-31"
"2019-12-31",
"2020-01-01",
"2020-01-24",
"2020-01-27",
"2020-04-15",
"2020-04-30",
"2020-05-01",
"2020-05-05",
"2020-09-30",
"2020-10-01",
"2020-10-02",
"2020-10-09",
"2020-12-25",
"2020-12-31"
])


Expand Down

0 comments on commit bb978bf

Please sign in to comment.