From 53ec3116e9a47e8ce4dab77b638cc024c9183ec5 Mon Sep 17 00:00:00 2001 From: Sercan Turkmen Date: Tue, 13 Dec 2022 09:26:39 +0900 Subject: [PATCH 1/5] test(xtks): add xtks 2023 tests --- tests/resources/xtks.csv | 249 +++++++++++++++++++++++++++++++++++- tests/test_xtks_calendar.py | 31 +++++ 2 files changed, 279 insertions(+), 1 deletion(-) diff --git a/tests/resources/xtks.csv b/tests/resources/xtks.csv index c45d04c4..5f8ab3a4 100644 --- a/tests/resources/xtks.csv +++ b/tests/resources/xtks.csv @@ -5635,4 +5635,251 @@ 2022-12-27,2022-12-27 00:01:00,2022-12-27 06:00:00 2022-12-28,2022-12-28 00:01:00,2022-12-28 06:00:00 2022-12-29,2022-12-29 00:01:00,2022-12-29 06:00:00 -2022-12-30,2022-12-30 00:01:00,2022-12-30 06:00:00 \ No newline at end of file +2022-12-30,2022-12-30 00:01:00,2022-12-30 06:00:00 +2023-01-04,2023-01-04 00:01:00,2023-01-04 06:00:00 +2023-01-05,2023-01-05 00:01:00,2023-01-05 06:00:00 +2023-01-06,2023-01-06 00:01:00,2023-01-06 06:00:00 +2023-01-10,2023-01-10 00:01:00,2023-01-10 06:00:00 +2023-01-11,2023-01-11 00:01:00,2023-01-11 06:00:00 +2023-01-12,2023-01-12 00:01:00,2023-01-12 06:00:00 +2023-01-13,2023-01-13 00:01:00,2023-01-13 06:00:00 +2023-01-16,2023-01-16 00:01:00,2023-01-16 06:00:00 +2023-01-17,2023-01-17 00:01:00,2023-01-17 06:00:00 +2023-01-18,2023-01-18 00:01:00,2023-01-18 06:00:00 +2023-01-19,2023-01-19 00:01:00,2023-01-19 06:00:00 +2023-01-20,2023-01-20 00:01:00,2023-01-20 06:00:00 +2023-01-23,2023-01-23 00:01:00,2023-01-23 06:00:00 +2023-01-24,2023-01-24 00:01:00,2023-01-24 06:00:00 +2023-01-25,2023-01-25 00:01:00,2023-01-25 06:00:00 +2023-01-26,2023-01-26 00:01:00,2023-01-26 06:00:00 +2023-01-27,2023-01-27 00:01:00,2023-01-27 06:00:00 +2023-01-30,2023-01-30 00:01:00,2023-01-30 06:00:00 +2023-01-31,2023-01-31 00:01:00,2023-01-31 06:00:00 +2023-02-01,2023-02-01 00:01:00,2023-02-01 06:00:00 +2023-02-02,2023-02-02 00:01:00,2023-02-02 06:00:00 +2023-02-03,2023-02-03 00:01:00,2023-02-03 06:00:00 +2023-02-06,2023-02-06 00:01:00,2023-02-06 06:00:00 +2023-02-07,2023-02-07 00:01:00,2023-02-07 06:00:00 +2023-02-08,2023-02-08 00:01:00,2023-02-08 06:00:00 +2023-02-09,2023-02-09 00:01:00,2023-02-09 06:00:00 +2023-02-10,2023-02-10 00:01:00,2023-02-10 06:00:00 +2023-02-13,2023-02-13 00:01:00,2023-02-13 06:00:00 +2023-02-14,2023-02-14 00:01:00,2023-02-14 06:00:00 +2023-02-15,2023-02-15 00:01:00,2023-02-15 06:00:00 +2023-02-16,2023-02-16 00:01:00,2023-02-16 06:00:00 +2023-02-17,2023-02-17 00:01:00,2023-02-17 06:00:00 +2023-02-20,2023-02-20 00:01:00,2023-02-20 06:00:00 +2023-02-21,2023-02-21 00:01:00,2023-02-21 06:00:00 +2023-02-22,2023-02-22 00:01:00,2023-02-22 06:00:00 +2023-02-24,2023-02-24 00:01:00,2023-02-24 06:00:00 +2023-02-27,2023-02-27 00:01:00,2023-02-27 06:00:00 +2023-02-28,2023-02-28 00:01:00,2023-02-28 06:00:00 +2023-03-01,2023-03-01 00:01:00,2023-03-01 06:00:00 +2023-03-02,2023-03-02 00:01:00,2023-03-02 06:00:00 +2023-03-03,2023-03-03 00:01:00,2023-03-03 06:00:00 +2023-03-06,2023-03-06 00:01:00,2023-03-06 06:00:00 +2023-03-07,2023-03-07 00:01:00,2023-03-07 06:00:00 +2023-03-08,2023-03-08 00:01:00,2023-03-08 06:00:00 +2023-03-09,2023-03-09 00:01:00,2023-03-09 06:00:00 +2023-03-10,2023-03-10 00:01:00,2023-03-10 06:00:00 +2023-03-13,2023-03-13 00:01:00,2023-03-13 06:00:00 +2023-03-14,2023-03-14 00:01:00,2023-03-14 06:00:00 +2023-03-15,2023-03-15 00:01:00,2023-03-15 06:00:00 +2023-03-16,2023-03-16 00:01:00,2023-03-16 06:00:00 +2023-03-17,2023-03-17 00:01:00,2023-03-17 06:00:00 +2023-03-20,2023-03-20 00:01:00,2023-03-20 06:00:00 +2023-03-21,2023-03-21 00:01:00,2023-03-21 06:00:00 +2023-03-22,2023-03-22 00:01:00,2023-03-22 06:00:00 +2023-03-23,2023-03-23 00:01:00,2023-03-23 06:00:00 +2023-03-24,2023-03-24 00:01:00,2023-03-24 06:00:00 +2023-03-27,2023-03-27 00:01:00,2023-03-27 06:00:00 +2023-03-28,2023-03-28 00:01:00,2023-03-28 06:00:00 +2023-03-29,2023-03-29 00:01:00,2023-03-29 06:00:00 +2023-03-30,2023-03-30 00:01:00,2023-03-30 06:00:00 +2023-03-31,2023-03-31 00:01:00,2023-03-31 06:00:00 +2023-04-03,2023-04-03 00:01:00,2023-04-03 06:00:00 +2023-04-04,2023-04-04 00:01:00,2023-04-04 06:00:00 +2023-04-05,2023-04-05 00:01:00,2023-04-05 06:00:00 +2023-04-06,2023-04-06 00:01:00,2023-04-06 06:00:00 +2023-04-07,2023-04-07 00:01:00,2023-04-07 06:00:00 +2023-04-10,2023-04-10 00:01:00,2023-04-10 06:00:00 +2023-04-11,2023-04-11 00:01:00,2023-04-11 06:00:00 +2023-04-12,2023-04-12 00:01:00,2023-04-12 06:00:00 +2023-04-13,2023-04-13 00:01:00,2023-04-13 06:00:00 +2023-04-14,2023-04-14 00:01:00,2023-04-14 06:00:00 +2023-04-17,2023-04-17 00:01:00,2023-04-17 06:00:00 +2023-04-18,2023-04-18 00:01:00,2023-04-18 06:00:00 +2023-04-19,2023-04-19 00:01:00,2023-04-19 06:00:00 +2023-04-20,2023-04-20 00:01:00,2023-04-20 06:00:00 +2023-04-21,2023-04-21 00:01:00,2023-04-21 06:00:00 +2023-04-24,2023-04-24 00:01:00,2023-04-24 06:00:00 +2023-04-25,2023-04-25 00:01:00,2023-04-25 06:00:00 +2023-04-26,2023-04-26 00:01:00,2023-04-26 06:00:00 +2023-04-27,2023-04-27 00:01:00,2023-04-27 06:00:00 +2023-04-28,2023-04-28 00:01:00,2023-04-28 06:00:00 +2023-05-01,2023-05-01 00:01:00,2023-05-01 06:00:00 +2023-05-02,2023-05-02 00:01:00,2023-05-02 06:00:00 +2023-05-08,2023-05-08 00:01:00,2023-05-08 06:00:00 +2023-05-09,2023-05-09 00:01:00,2023-05-09 06:00:00 +2023-05-10,2023-05-10 00:01:00,2023-05-10 06:00:00 +2023-05-11,2023-05-11 00:01:00,2023-05-11 06:00:00 +2023-05-12,2023-05-12 00:01:00,2023-05-12 06:00:00 +2023-05-15,2023-05-15 00:01:00,2023-05-15 06:00:00 +2023-05-16,2023-05-16 00:01:00,2023-05-16 06:00:00 +2023-05-17,2023-05-17 00:01:00,2023-05-17 06:00:00 +2023-05-18,2023-05-18 00:01:00,2023-05-18 06:00:00 +2023-05-19,2023-05-19 00:01:00,2023-05-19 06:00:00 +2023-05-22,2023-05-22 00:01:00,2023-05-22 06:00:00 +2023-05-23,2023-05-23 00:01:00,2023-05-23 06:00:00 +2023-05-24,2023-05-24 00:01:00,2023-05-24 06:00:00 +2023-05-25,2023-05-25 00:01:00,2023-05-25 06:00:00 +2023-05-26,2023-05-26 00:01:00,2023-05-26 06:00:00 +2023-05-29,2023-05-29 00:01:00,2023-05-29 06:00:00 +2023-05-30,2023-05-30 00:01:00,2023-05-30 06:00:00 +2023-05-31,2023-05-31 00:01:00,2023-05-31 06:00:00 +2023-06-01,2023-06-01 00:01:00,2023-06-01 06:00:00 +2023-06-02,2023-06-02 00:01:00,2023-06-02 06:00:00 +2023-06-05,2023-06-05 00:01:00,2023-06-05 06:00:00 +2023-06-06,2023-06-06 00:01:00,2023-06-06 06:00:00 +2023-06-07,2023-06-07 00:01:00,2023-06-07 06:00:00 +2023-06-08,2023-06-08 00:01:00,2023-06-08 06:00:00 +2023-06-09,2023-06-09 00:01:00,2023-06-09 06:00:00 +2023-06-12,2023-06-12 00:01:00,2023-06-12 06:00:00 +2023-06-13,2023-06-13 00:01:00,2023-06-13 06:00:00 +2023-06-14,2023-06-14 00:01:00,2023-06-14 06:00:00 +2023-06-15,2023-06-15 00:01:00,2023-06-15 06:00:00 +2023-06-16,2023-06-16 00:01:00,2023-06-16 06:00:00 +2023-06-19,2023-06-19 00:01:00,2023-06-19 06:00:00 +2023-06-20,2023-06-20 00:01:00,2023-06-20 06:00:00 +2023-06-21,2023-06-21 00:01:00,2023-06-21 06:00:00 +2023-06-22,2023-06-22 00:01:00,2023-06-22 06:00:00 +2023-06-23,2023-06-23 00:01:00,2023-06-23 06:00:00 +2023-06-26,2023-06-26 00:01:00,2023-06-26 06:00:00 +2023-06-27,2023-06-27 00:01:00,2023-06-27 06:00:00 +2023-06-28,2023-06-28 00:01:00,2023-06-28 06:00:00 +2023-06-29,2023-06-29 00:01:00,2023-06-29 06:00:00 +2023-06-30,2023-06-30 00:01:00,2023-06-30 06:00:00 +2023-07-03,2023-07-03 00:01:00,2023-07-03 06:00:00 +2023-07-04,2023-07-04 00:01:00,2023-07-04 06:00:00 +2023-07-05,2023-07-05 00:01:00,2023-07-05 06:00:00 +2023-07-06,2023-07-06 00:01:00,2023-07-06 06:00:00 +2023-07-07,2023-07-07 00:01:00,2023-07-07 06:00:00 +2023-07-10,2023-07-10 00:01:00,2023-07-10 06:00:00 +2023-07-11,2023-07-11 00:01:00,2023-07-11 06:00:00 +2023-07-12,2023-07-12 00:01:00,2023-07-12 06:00:00 +2023-07-13,2023-07-13 00:01:00,2023-07-13 06:00:00 +2023-07-14,2023-07-14 00:01:00,2023-07-14 06:00:00 +2023-07-18,2023-07-18 00:01:00,2023-07-18 06:00:00 +2023-07-19,2023-07-19 00:01:00,2023-07-19 06:00:00 +2023-07-20,2023-07-20 00:01:00,2023-07-20 06:00:00 +2023-07-21,2023-07-21 00:01:00,2023-07-21 06:00:00 +2023-07-24,2023-07-24 00:01:00,2023-07-24 06:00:00 +2023-07-25,2023-07-25 00:01:00,2023-07-25 06:00:00 +2023-07-26,2023-07-26 00:01:00,2023-07-26 06:00:00 +2023-07-27,2023-07-27 00:01:00,2023-07-27 06:00:00 +2023-07-28,2023-07-28 00:01:00,2023-07-28 06:00:00 +2023-07-31,2023-07-31 00:01:00,2023-07-31 06:00:00 +2023-08-01,2023-08-01 00:01:00,2023-08-01 06:00:00 +2023-08-02,2023-08-02 00:01:00,2023-08-02 06:00:00 +2023-08-03,2023-08-03 00:01:00,2023-08-03 06:00:00 +2023-08-04,2023-08-04 00:01:00,2023-08-04 06:00:00 +2023-08-07,2023-08-07 00:01:00,2023-08-07 06:00:00 +2023-08-08,2023-08-08 00:01:00,2023-08-08 06:00:00 +2023-08-09,2023-08-09 00:01:00,2023-08-09 06:00:00 +2023-08-10,2023-08-10 00:01:00,2023-08-10 06:00:00 +2023-08-14,2023-08-14 00:01:00,2023-08-14 06:00:00 +2023-08-15,2023-08-15 00:01:00,2023-08-15 06:00:00 +2023-08-16,2023-08-16 00:01:00,2023-08-16 06:00:00 +2023-08-17,2023-08-17 00:01:00,2023-08-17 06:00:00 +2023-08-18,2023-08-18 00:01:00,2023-08-18 06:00:00 +2023-08-21,2023-08-21 00:01:00,2023-08-21 06:00:00 +2023-08-22,2023-08-22 00:01:00,2023-08-22 06:00:00 +2023-08-23,2023-08-23 00:01:00,2023-08-23 06:00:00 +2023-08-24,2023-08-24 00:01:00,2023-08-24 06:00:00 +2023-08-25,2023-08-25 00:01:00,2023-08-25 06:00:00 +2023-08-28,2023-08-28 00:01:00,2023-08-28 06:00:00 +2023-08-29,2023-08-29 00:01:00,2023-08-29 06:00:00 +2023-08-30,2023-08-30 00:01:00,2023-08-30 06:00:00 +2023-08-31,2023-08-31 00:01:00,2023-08-31 06:00:00 +2023-09-01,2023-09-01 00:01:00,2023-09-01 06:00:00 +2023-09-04,2023-09-04 00:01:00,2023-09-04 06:00:00 +2023-09-05,2023-09-05 00:01:00,2023-09-05 06:00:00 +2023-09-06,2023-09-06 00:01:00,2023-09-06 06:00:00 +2023-09-07,2023-09-07 00:01:00,2023-09-07 06:00:00 +2023-09-08,2023-09-08 00:01:00,2023-09-08 06:00:00 +2023-09-11,2023-09-11 00:01:00,2023-09-11 06:00:00 +2023-09-12,2023-09-12 00:01:00,2023-09-12 06:00:00 +2023-09-13,2023-09-13 00:01:00,2023-09-13 06:00:00 +2023-09-14,2023-09-14 00:01:00,2023-09-14 06:00:00 +2023-09-15,2023-09-15 00:01:00,2023-09-15 06:00:00 +2023-09-19,2023-09-19 00:01:00,2023-09-19 06:00:00 +2023-09-20,2023-09-20 00:01:00,2023-09-20 06:00:00 +2023-09-21,2023-09-21 00:01:00,2023-09-21 06:00:00 +2023-09-22,2023-09-22 00:01:00,2023-09-22 06:00:00 +2023-09-25,2023-09-25 00:01:00,2023-09-25 06:00:00 +2023-09-26,2023-09-26 00:01:00,2023-09-26 06:00:00 +2023-09-27,2023-09-27 00:01:00,2023-09-27 06:00:00 +2023-09-28,2023-09-28 00:01:00,2023-09-28 06:00:00 +2023-09-29,2023-09-29 00:01:00,2023-09-29 06:00:00 +2023-10-02,2023-10-02 00:01:00,2023-10-02 06:00:00 +2023-10-03,2023-10-03 00:01:00,2023-10-03 06:00:00 +2023-10-04,2023-10-04 00:01:00,2023-10-04 06:00:00 +2023-10-05,2023-10-05 00:01:00,2023-10-05 06:00:00 +2023-10-06,2023-10-06 00:01:00,2023-10-06 06:00:00 +2023-10-10,2023-10-10 00:01:00,2023-10-10 06:00:00 +2023-10-11,2023-10-11 00:01:00,2023-10-11 06:00:00 +2023-10-12,2023-10-12 00:01:00,2023-10-12 06:00:00 +2023-10-13,2023-10-13 00:01:00,2023-10-13 06:00:00 +2023-10-16,2023-10-16 00:01:00,2023-10-16 06:00:00 +2023-10-17,2023-10-17 00:01:00,2023-10-17 06:00:00 +2023-10-18,2023-10-18 00:01:00,2023-10-18 06:00:00 +2023-10-19,2023-10-19 00:01:00,2023-10-19 06:00:00 +2023-10-20,2023-10-20 00:01:00,2023-10-20 06:00:00 +2023-10-23,2023-10-23 00:01:00,2023-10-23 06:00:00 +2023-10-24,2023-10-24 00:01:00,2023-10-24 06:00:00 +2023-10-25,2023-10-25 00:01:00,2023-10-25 06:00:00 +2023-10-26,2023-10-26 00:01:00,2023-10-26 06:00:00 +2023-10-27,2023-10-27 00:01:00,2023-10-27 06:00:00 +2023-10-30,2023-10-30 00:01:00,2023-10-30 06:00:00 +2023-10-31,2023-10-31 00:01:00,2023-10-31 06:00:00 +2023-11-01,2023-11-01 00:01:00,2023-11-01 06:00:00 +2023-11-02,2023-11-02 00:01:00,2023-11-02 06:00:00 +2023-11-06,2023-11-06 00:01:00,2023-11-06 06:00:00 +2023-11-07,2023-11-07 00:01:00,2023-11-07 06:00:00 +2023-11-08,2023-11-08 00:01:00,2023-11-08 06:00:00 +2023-11-09,2023-11-09 00:01:00,2023-11-09 06:00:00 +2023-11-10,2023-11-10 00:01:00,2023-11-10 06:00:00 +2023-11-13,2023-11-13 00:01:00,2023-11-13 06:00:00 +2023-11-14,2023-11-14 00:01:00,2023-11-14 06:00:00 +2023-11-15,2023-11-15 00:01:00,2023-11-15 06:00:00 +2023-11-16,2023-11-16 00:01:00,2023-11-16 06:00:00 +2023-11-17,2023-11-17 00:01:00,2023-11-17 06:00:00 +2023-11-20,2023-11-20 00:01:00,2023-11-20 06:00:00 +2023-11-21,2023-11-21 00:01:00,2023-11-21 06:00:00 +2023-11-22,2023-11-22 00:01:00,2023-11-22 06:00:00 +2023-11-24,2023-11-24 00:01:00,2023-11-24 06:00:00 +2023-11-27,2023-11-27 00:01:00,2023-11-27 06:00:00 +2023-11-28,2023-11-28 00:01:00,2023-11-28 06:00:00 +2023-11-29,2023-11-29 00:01:00,2023-11-29 06:00:00 +2023-11-30,2023-11-30 00:01:00,2023-11-30 06:00:00 +2023-12-01,2023-12-01 00:01:00,2023-12-01 06:00:00 +2023-12-04,2023-12-04 00:01:00,2023-12-04 06:00:00 +2023-12-05,2023-12-05 00:01:00,2023-12-05 06:00:00 +2023-12-06,2023-12-06 00:01:00,2023-12-06 06:00:00 +2023-12-07,2023-12-07 00:01:00,2023-12-07 06:00:00 +2023-12-08,2023-12-08 00:01:00,2023-12-08 06:00:00 +2023-12-11,2023-12-11 00:01:00,2023-12-11 06:00:00 +2023-12-12,2023-12-12 00:01:00,2023-12-12 06:00:00 +2023-12-13,2023-12-13 00:01:00,2023-12-13 06:00:00 +2023-12-14,2023-12-14 00:01:00,2023-12-14 06:00:00 +2023-12-15,2023-12-15 00:01:00,2023-12-15 06:00:00 +2023-12-18,2023-12-18 00:01:00,2023-12-18 06:00:00 +2023-12-19,2023-12-19 00:01:00,2023-12-19 06:00:00 +2023-12-20,2023-12-20 00:01:00,2023-12-20 06:00:00 +2023-12-21,2023-12-21 00:01:00,2023-12-21 06:00:00 +2023-12-22,2023-12-22 00:01:00,2023-12-22 06:00:00 +2023-12-25,2023-12-25 00:01:00,2023-12-25 06:00:00 +2023-12-26,2023-12-26 00:01:00,2023-12-26 06:00:00 +2023-12-27,2023-12-27 00:01:00,2023-12-27 06:00:00 +2023-12-28,2023-12-28 00:01:00,2023-12-28 06:00:00 +2023-12-29,2023-12-29 00:01:00,2023-12-29 06:00:00 diff --git a/tests/test_xtks_calendar.py b/tests/test_xtks_calendar.py index 3ee52f56..7d0be775 100644 --- a/tests/test_xtks_calendar.py +++ b/tests/test_xtks_calendar.py @@ -284,3 +284,34 @@ def test_2022(self): for session_label in expected_holidays_2022: self.assertNotIn(session_label, self.calendar.all_sessions) + + def test_2023(self): + expected_holidays_2023 = [ + pd.Timestamp("2023-01-01", tz="UTC"), # New Year's Day + pd.Timestamp("2023-01-02", tz="UTC"), # Market Holiday + pd.Timestamp("2023-01-03", tz="UTC"), # Market Holiday + pd.Timestamp("2023-01-09", tz="UTC"), # Coming of Age Day + pd.Timestamp("2023-02-11", tz="UTC"), # National Foundation Day + pd.Timestamp("2023-02-23", tz="UTC"), # Emperor's Birthday + pd.Timestamp("2023-03-21", tz="UTC"), # Vernal Equinox + pd.Timestamp("2023-04-29", tz="UTC"), # Showa Day + pd.Timestamp("2023-05-03", tz="UTC"), # Constitution Memorial Day + pd.Timestamp("2023-05-04", tz="UTC"), # Greenery Day + pd.Timestamp("2023-05-05", tz="UTC"), # Children's Day + pd.Timestamp("2023-07-17", tz="UTC"), # Marine Day + pd.Timestamp("2023-08-11", tz="UTC"), # Mountain Day + pd.Timestamp("2023-09-18", tz="UTC"), # Respect for the Aged Day + pd.Timestamp("2023-09-23", tz="UTC"), # Autumnal Equinox + pd.Timestamp("2023-10-09", tz="UTC"), # Sports Day + pd.Timestamp("2023-11-03", tz="UTC"), # Culture Day + pd.Timestamp("2023-11-23", tz="UTC"), # Labor Thanksgiving Day + pd.Timestamp("2023-12-31", tz="UTC"), # Market Holiday + ] + + for session_label in expected_holidays_2023: + self.assertNotIn(session_label, self.calendar.all_sessions) + + weekdays = pd.bdate_range(start="2023-01-01", end="2023-12-31", tz="UTC") + bdays = weekdays[~weekdays.isin(expected_holidays_2023)] + for session_label in bdays: + self.assertIn(session_label, self.calendar.all_sessions) From a04f9f4d91927fcfb99e234fc2c230f044574704 Mon Sep 17 00:00:00 2001 From: Sercan Turkmen Date: Tue, 13 Dec 2022 09:48:11 +0900 Subject: [PATCH 2/5] test(xnys): add xnys 2023 tests --- tests/resources/xnys.csv | 252 +++++++++++++++++++++++++++++++++++- tests/test_xnys_calendar.py | 30 +++++ 2 files changed, 281 insertions(+), 1 deletion(-) diff --git a/tests/resources/xnys.csv b/tests/resources/xnys.csv index ba2797ff..df14850d 100644 --- a/tests/resources/xnys.csv +++ b/tests/resources/xnys.csv @@ -8313,4 +8313,254 @@ 2022-12-27,2022-12-27 14:31:00,2022-12-27 21:00:00 2022-12-28,2022-12-28 14:31:00,2022-12-28 21:00:00 2022-12-29,2022-12-29 14:31:00,2022-12-29 21:00:00 -2022-12-30,2022-12-30 14:31:00,2022-12-30 21:00:00 \ No newline at end of file +2022-12-30,2022-12-30 14:31:00,2022-12-30 21:00:00 +2023-01-03,2023-01-03 14:31:00,2023-01-03 21:00:00 +2023-01-04,2023-01-04 14:31:00,2023-01-04 21:00:00 +2023-01-05,2023-01-05 14:31:00,2023-01-05 21:00:00 +2023-01-06,2023-01-06 14:31:00,2023-01-06 21:00:00 +2023-01-09,2023-01-09 14:31:00,2023-01-09 21:00:00 +2023-01-10,2023-01-10 14:31:00,2023-01-10 21:00:00 +2023-01-11,2023-01-11 14:31:00,2023-01-11 21:00:00 +2023-01-12,2023-01-12 14:31:00,2023-01-12 21:00:00 +2023-01-13,2023-01-13 14:31:00,2023-01-13 21:00:00 +2023-01-17,2023-01-17 14:31:00,2023-01-17 21:00:00 +2023-01-18,2023-01-18 14:31:00,2023-01-18 21:00:00 +2023-01-19,2023-01-19 14:31:00,2023-01-19 21:00:00 +2023-01-20,2023-01-20 14:31:00,2023-01-20 21:00:00 +2023-01-23,2023-01-23 14:31:00,2023-01-23 21:00:00 +2023-01-24,2023-01-24 14:31:00,2023-01-24 21:00:00 +2023-01-25,2023-01-25 14:31:00,2023-01-25 21:00:00 +2023-01-26,2023-01-26 14:31:00,2023-01-26 21:00:00 +2023-01-27,2023-01-27 14:31:00,2023-01-27 21:00:00 +2023-01-30,2023-01-30 14:31:00,2023-01-30 21:00:00 +2023-01-31,2023-01-31 14:31:00,2023-01-31 21:00:00 +2023-02-01,2023-02-01 14:31:00,2023-02-01 21:00:00 +2023-02-02,2023-02-02 14:31:00,2023-02-02 21:00:00 +2023-02-03,2023-02-03 14:31:00,2023-02-03 21:00:00 +2023-02-06,2023-02-06 14:31:00,2023-02-06 21:00:00 +2023-02-07,2023-02-07 14:31:00,2023-02-07 21:00:00 +2023-02-08,2023-02-08 14:31:00,2023-02-08 21:00:00 +2023-02-09,2023-02-09 14:31:00,2023-02-09 21:00:00 +2023-02-10,2023-02-10 14:31:00,2023-02-10 21:00:00 +2023-02-13,2023-02-13 14:31:00,2023-02-13 21:00:00 +2023-02-14,2023-02-14 14:31:00,2023-02-14 21:00:00 +2023-02-15,2023-02-15 14:31:00,2023-02-15 21:00:00 +2023-02-16,2023-02-16 14:31:00,2023-02-16 21:00:00 +2023-02-17,2023-02-17 14:31:00,2023-02-17 21:00:00 +2023-02-21,2023-02-21 14:31:00,2023-02-21 21:00:00 +2023-02-22,2023-02-22 14:31:00,2023-02-22 21:00:00 +2023-02-23,2023-02-23 14:31:00,2023-02-23 21:00:00 +2023-02-24,2023-02-24 14:31:00,2023-02-24 21:00:00 +2023-02-27,2023-02-27 14:31:00,2023-02-27 21:00:00 +2023-02-28,2023-02-28 14:31:00,2023-02-28 21:00:00 +2023-03-01,2023-03-01 14:31:00,2023-03-01 21:00:00 +2023-03-02,2023-03-02 14:31:00,2023-03-02 21:00:00 +2023-03-03,2023-03-03 14:31:00,2023-03-03 21:00:00 +2023-03-06,2023-03-06 14:31:00,2023-03-06 21:00:00 +2023-03-07,2023-03-07 14:31:00,2023-03-07 21:00:00 +2023-03-08,2023-03-08 14:31:00,2023-03-08 21:00:00 +2023-03-09,2023-03-09 14:31:00,2023-03-09 21:00:00 +2023-03-10,2023-03-10 14:31:00,2023-03-10 21:00:00 +2023-03-13,2023-03-13 13:31:00,2023-03-13 20:00:00 +2023-03-14,2023-03-14 13:31:00,2023-03-14 20:00:00 +2023-03-15,2023-03-15 13:31:00,2023-03-15 20:00:00 +2023-03-16,2023-03-16 13:31:00,2023-03-16 20:00:00 +2023-03-17,2023-03-17 13:31:00,2023-03-17 20:00:00 +2023-03-20,2023-03-20 13:31:00,2023-03-20 20:00:00 +2023-03-21,2023-03-21 13:31:00,2023-03-21 20:00:00 +2023-03-22,2023-03-22 13:31:00,2023-03-22 20:00:00 +2023-03-23,2023-03-23 13:31:00,2023-03-23 20:00:00 +2023-03-24,2023-03-24 13:31:00,2023-03-24 20:00:00 +2023-03-27,2023-03-27 13:31:00,2023-03-27 20:00:00 +2023-03-28,2023-03-28 13:31:00,2023-03-28 20:00:00 +2023-03-29,2023-03-29 13:31:00,2023-03-29 20:00:00 +2023-03-30,2023-03-30 13:31:00,2023-03-30 20:00:00 +2023-03-31,2023-03-31 13:31:00,2023-03-31 20:00:00 +2023-04-03,2023-04-03 13:31:00,2023-04-03 20:00:00 +2023-04-04,2023-04-04 13:31:00,2023-04-04 20:00:00 +2023-04-05,2023-04-05 13:31:00,2023-04-05 20:00:00 +2023-04-06,2023-04-06 13:31:00,2023-04-06 20:00:00 +2023-04-10,2023-04-10 13:31:00,2023-04-10 20:00:00 +2023-04-11,2023-04-11 13:31:00,2023-04-11 20:00:00 +2023-04-12,2023-04-12 13:31:00,2023-04-12 20:00:00 +2023-04-13,2023-04-13 13:31:00,2023-04-13 20:00:00 +2023-04-14,2023-04-14 13:31:00,2023-04-14 20:00:00 +2023-04-17,2023-04-17 13:31:00,2023-04-17 20:00:00 +2023-04-18,2023-04-18 13:31:00,2023-04-18 20:00:00 +2023-04-19,2023-04-19 13:31:00,2023-04-19 20:00:00 +2023-04-20,2023-04-20 13:31:00,2023-04-20 20:00:00 +2023-04-21,2023-04-21 13:31:00,2023-04-21 20:00:00 +2023-04-24,2023-04-24 13:31:00,2023-04-24 20:00:00 +2023-04-25,2023-04-25 13:31:00,2023-04-25 20:00:00 +2023-04-26,2023-04-26 13:31:00,2023-04-26 20:00:00 +2023-04-27,2023-04-27 13:31:00,2023-04-27 20:00:00 +2023-04-28,2023-04-28 13:31:00,2023-04-28 20:00:00 +2023-05-01,2023-05-01 13:31:00,2023-05-01 20:00:00 +2023-05-02,2023-05-02 13:31:00,2023-05-02 20:00:00 +2023-05-03,2023-05-03 13:31:00,2023-05-03 20:00:00 +2023-05-04,2023-05-04 13:31:00,2023-05-04 20:00:00 +2023-05-05,2023-05-05 13:31:00,2023-05-05 20:00:00 +2023-05-08,2023-05-08 13:31:00,2023-05-08 20:00:00 +2023-05-09,2023-05-09 13:31:00,2023-05-09 20:00:00 +2023-05-10,2023-05-10 13:31:00,2023-05-10 20:00:00 +2023-05-11,2023-05-11 13:31:00,2023-05-11 20:00:00 +2023-05-12,2023-05-12 13:31:00,2023-05-12 20:00:00 +2023-05-15,2023-05-15 13:31:00,2023-05-15 20:00:00 +2023-05-16,2023-05-16 13:31:00,2023-05-16 20:00:00 +2023-05-17,2023-05-17 13:31:00,2023-05-17 20:00:00 +2023-05-18,2023-05-18 13:31:00,2023-05-18 20:00:00 +2023-05-19,2023-05-19 13:31:00,2023-05-19 20:00:00 +2023-05-22,2023-05-22 13:31:00,2023-05-22 20:00:00 +2023-05-23,2023-05-23 13:31:00,2023-05-23 20:00:00 +2023-05-24,2023-05-24 13:31:00,2023-05-24 20:00:00 +2023-05-25,2023-05-25 13:31:00,2023-05-25 20:00:00 +2023-05-26,2023-05-26 13:31:00,2023-05-26 20:00:00 +2023-05-30,2023-05-30 13:31:00,2023-05-30 20:00:00 +2023-05-31,2023-05-31 13:31:00,2023-05-31 20:00:00 +2023-06-01,2023-06-01 13:31:00,2023-06-01 20:00:00 +2023-06-02,2023-06-02 13:31:00,2023-06-02 20:00:00 +2023-06-05,2023-06-05 13:31:00,2023-06-05 20:00:00 +2023-06-06,2023-06-06 13:31:00,2023-06-06 20:00:00 +2023-06-07,2023-06-07 13:31:00,2023-06-07 20:00:00 +2023-06-08,2023-06-08 13:31:00,2023-06-08 20:00:00 +2023-06-09,2023-06-09 13:31:00,2023-06-09 20:00:00 +2023-06-12,2023-06-12 13:31:00,2023-06-12 20:00:00 +2023-06-13,2023-06-13 13:31:00,2023-06-13 20:00:00 +2023-06-14,2023-06-14 13:31:00,2023-06-14 20:00:00 +2023-06-15,2023-06-15 13:31:00,2023-06-15 20:00:00 +2023-06-16,2023-06-16 13:31:00,2023-06-16 20:00:00 +2023-06-20,2023-06-20 13:31:00,2023-06-20 20:00:00 +2023-06-21,2023-06-21 13:31:00,2023-06-21 20:00:00 +2023-06-22,2023-06-22 13:31:00,2023-06-22 20:00:00 +2023-06-23,2023-06-23 13:31:00,2023-06-23 20:00:00 +2023-06-26,2023-06-26 13:31:00,2023-06-26 20:00:00 +2023-06-27,2023-06-27 13:31:00,2023-06-27 20:00:00 +2023-06-28,2023-06-28 13:31:00,2023-06-28 20:00:00 +2023-06-29,2023-06-29 13:31:00,2023-06-29 20:00:00 +2023-06-30,2023-06-30 13:31:00,2023-06-30 20:00:00 +2023-07-03,2023-07-03 13:31:00,2023-07-03 17:00:00 +2023-07-05,2023-07-05 13:31:00,2023-07-05 20:00:00 +2023-07-06,2023-07-06 13:31:00,2023-07-06 20:00:00 +2023-07-07,2023-07-07 13:31:00,2023-07-07 20:00:00 +2023-07-10,2023-07-10 13:31:00,2023-07-10 20:00:00 +2023-07-11,2023-07-11 13:31:00,2023-07-11 20:00:00 +2023-07-12,2023-07-12 13:31:00,2023-07-12 20:00:00 +2023-07-13,2023-07-13 13:31:00,2023-07-13 20:00:00 +2023-07-14,2023-07-14 13:31:00,2023-07-14 20:00:00 +2023-07-17,2023-07-17 13:31:00,2023-07-17 20:00:00 +2023-07-18,2023-07-18 13:31:00,2023-07-18 20:00:00 +2023-07-19,2023-07-19 13:31:00,2023-07-19 20:00:00 +2023-07-20,2023-07-20 13:31:00,2023-07-20 20:00:00 +2023-07-21,2023-07-21 13:31:00,2023-07-21 20:00:00 +2023-07-24,2023-07-24 13:31:00,2023-07-24 20:00:00 +2023-07-25,2023-07-25 13:31:00,2023-07-25 20:00:00 +2023-07-26,2023-07-26 13:31:00,2023-07-26 20:00:00 +2023-07-27,2023-07-27 13:31:00,2023-07-27 20:00:00 +2023-07-28,2023-07-28 13:31:00,2023-07-28 20:00:00 +2023-07-31,2023-07-31 13:31:00,2023-07-31 20:00:00 +2023-08-01,2023-08-01 13:31:00,2023-08-01 20:00:00 +2023-08-02,2023-08-02 13:31:00,2023-08-02 20:00:00 +2023-08-03,2023-08-03 13:31:00,2023-08-03 20:00:00 +2023-08-04,2023-08-04 13:31:00,2023-08-04 20:00:00 +2023-08-07,2023-08-07 13:31:00,2023-08-07 20:00:00 +2023-08-08,2023-08-08 13:31:00,2023-08-08 20:00:00 +2023-08-09,2023-08-09 13:31:00,2023-08-09 20:00:00 +2023-08-10,2023-08-10 13:31:00,2023-08-10 20:00:00 +2023-08-11,2023-08-11 13:31:00,2023-08-11 20:00:00 +2023-08-14,2023-08-14 13:31:00,2023-08-14 20:00:00 +2023-08-15,2023-08-15 13:31:00,2023-08-15 20:00:00 +2023-08-16,2023-08-16 13:31:00,2023-08-16 20:00:00 +2023-08-17,2023-08-17 13:31:00,2023-08-17 20:00:00 +2023-08-18,2023-08-18 13:31:00,2023-08-18 20:00:00 +2023-08-21,2023-08-21 13:31:00,2023-08-21 20:00:00 +2023-08-22,2023-08-22 13:31:00,2023-08-22 20:00:00 +2023-08-23,2023-08-23 13:31:00,2023-08-23 20:00:00 +2023-08-24,2023-08-24 13:31:00,2023-08-24 20:00:00 +2023-08-25,2023-08-25 13:31:00,2023-08-25 20:00:00 +2023-08-28,2023-08-28 13:31:00,2023-08-28 20:00:00 +2023-08-29,2023-08-29 13:31:00,2023-08-29 20:00:00 +2023-08-30,2023-08-30 13:31:00,2023-08-30 20:00:00 +2023-08-31,2023-08-31 13:31:00,2023-08-31 20:00:00 +2023-09-01,2023-09-01 13:31:00,2023-09-01 20:00:00 +2023-09-05,2023-09-05 13:31:00,2023-09-05 20:00:00 +2023-09-06,2023-09-06 13:31:00,2023-09-06 20:00:00 +2023-09-07,2023-09-07 13:31:00,2023-09-07 20:00:00 +2023-09-08,2023-09-08 13:31:00,2023-09-08 20:00:00 +2023-09-11,2023-09-11 13:31:00,2023-09-11 20:00:00 +2023-09-12,2023-09-12 13:31:00,2023-09-12 20:00:00 +2023-09-13,2023-09-13 13:31:00,2023-09-13 20:00:00 +2023-09-14,2023-09-14 13:31:00,2023-09-14 20:00:00 +2023-09-15,2023-09-15 13:31:00,2023-09-15 20:00:00 +2023-09-18,2023-09-18 13:31:00,2023-09-18 20:00:00 +2023-09-19,2023-09-19 13:31:00,2023-09-19 20:00:00 +2023-09-20,2023-09-20 13:31:00,2023-09-20 20:00:00 +2023-09-21,2023-09-21 13:31:00,2023-09-21 20:00:00 +2023-09-22,2023-09-22 13:31:00,2023-09-22 20:00:00 +2023-09-25,2023-09-25 13:31:00,2023-09-25 20:00:00 +2023-09-26,2023-09-26 13:31:00,2023-09-26 20:00:00 +2023-09-27,2023-09-27 13:31:00,2023-09-27 20:00:00 +2023-09-28,2023-09-28 13:31:00,2023-09-28 20:00:00 +2023-09-29,2023-09-29 13:31:00,2023-09-29 20:00:00 +2023-10-02,2023-10-02 13:31:00,2023-10-02 20:00:00 +2023-10-03,2023-10-03 13:31:00,2023-10-03 20:00:00 +2023-10-04,2023-10-04 13:31:00,2023-10-04 20:00:00 +2023-10-05,2023-10-05 13:31:00,2023-10-05 20:00:00 +2023-10-06,2023-10-06 13:31:00,2023-10-06 20:00:00 +2023-10-09,2023-10-09 13:31:00,2023-10-09 20:00:00 +2023-10-10,2023-10-10 13:31:00,2023-10-10 20:00:00 +2023-10-11,2023-10-11 13:31:00,2023-10-11 20:00:00 +2023-10-12,2023-10-12 13:31:00,2023-10-12 20:00:00 +2023-10-13,2023-10-13 13:31:00,2023-10-13 20:00:00 +2023-10-16,2023-10-16 13:31:00,2023-10-16 20:00:00 +2023-10-17,2023-10-17 13:31:00,2023-10-17 20:00:00 +2023-10-18,2023-10-18 13:31:00,2023-10-18 20:00:00 +2023-10-19,2023-10-19 13:31:00,2023-10-19 20:00:00 +2023-10-20,2023-10-20 13:31:00,2023-10-20 20:00:00 +2023-10-23,2023-10-23 13:31:00,2023-10-23 20:00:00 +2023-10-24,2023-10-24 13:31:00,2023-10-24 20:00:00 +2023-10-25,2023-10-25 13:31:00,2023-10-25 20:00:00 +2023-10-26,2023-10-26 13:31:00,2023-10-26 20:00:00 +2023-10-27,2023-10-27 13:31:00,2023-10-27 20:00:00 +2023-10-30,2023-10-30 13:31:00,2023-10-30 20:00:00 +2023-10-31,2023-10-31 13:31:00,2023-10-31 20:00:00 +2023-11-01,2023-11-01 13:31:00,2023-11-01 20:00:00 +2023-11-02,2023-11-02 13:31:00,2023-11-02 20:00:00 +2023-11-03,2023-11-03 13:31:00,2023-11-03 20:00:00 +2023-11-06,2023-11-06 14:31:00,2023-11-06 21:00:00 +2023-11-07,2023-11-07 14:31:00,2023-11-07 21:00:00 +2023-11-08,2023-11-08 14:31:00,2023-11-08 21:00:00 +2023-11-09,2023-11-09 14:31:00,2023-11-09 21:00:00 +2023-11-10,2023-11-10 14:31:00,2023-11-10 21:00:00 +2023-11-13,2023-11-13 14:31:00,2023-11-13 21:00:00 +2023-11-14,2023-11-14 14:31:00,2023-11-14 21:00:00 +2023-11-15,2023-11-15 14:31:00,2023-11-15 21:00:00 +2023-11-16,2023-11-16 14:31:00,2023-11-16 21:00:00 +2023-11-17,2023-11-17 14:31:00,2023-11-17 21:00:00 +2023-11-20,2023-11-20 14:31:00,2023-11-20 21:00:00 +2023-11-21,2023-11-21 14:31:00,2023-11-21 21:00:00 +2023-11-22,2023-11-22 14:31:00,2023-11-22 21:00:00 +2023-11-24,2023-11-24 14:31:00,2023-11-24 18:00:00 +2023-11-27,2023-11-27 14:31:00,2023-11-27 21:00:00 +2023-11-28,2023-11-28 14:31:00,2023-11-28 21:00:00 +2023-11-29,2023-11-29 14:31:00,2023-11-29 21:00:00 +2023-11-30,2023-11-30 14:31:00,2023-11-30 21:00:00 +2023-12-01,2023-12-01 14:31:00,2023-12-01 21:00:00 +2023-12-04,2023-12-04 14:31:00,2023-12-04 21:00:00 +2023-12-05,2023-12-05 14:31:00,2023-12-05 21:00:00 +2023-12-06,2023-12-06 14:31:00,2023-12-06 21:00:00 +2023-12-07,2023-12-07 14:31:00,2023-12-07 21:00:00 +2023-12-08,2023-12-08 14:31:00,2023-12-08 21:00:00 +2023-12-11,2023-12-11 14:31:00,2023-12-11 21:00:00 +2023-12-12,2023-12-12 14:31:00,2023-12-12 21:00:00 +2023-12-13,2023-12-13 14:31:00,2023-12-13 21:00:00 +2023-12-14,2023-12-14 14:31:00,2023-12-14 21:00:00 +2023-12-15,2023-12-15 14:31:00,2023-12-15 21:00:00 +2023-12-18,2023-12-18 14:31:00,2023-12-18 21:00:00 +2023-12-19,2023-12-19 14:31:00,2023-12-19 21:00:00 +2023-12-20,2023-12-20 14:31:00,2023-12-20 21:00:00 +2023-12-21,2023-12-21 14:31:00,2023-12-21 21:00:00 +2023-12-22,2023-12-22 14:31:00,2023-12-22 21:00:00 +2023-12-26,2023-12-26 14:31:00,2023-12-26 21:00:00 +2023-12-27,2023-12-27 14:31:00,2023-12-27 21:00:00 +2023-12-28,2023-12-28 14:31:00,2023-12-28 21:00:00 +2023-12-29,2023-12-29 14:31:00,2023-12-29 21:00:00 diff --git a/tests/test_xnys_calendar.py b/tests/test_xnys_calendar.py index af8dc8c5..6d83cf56 100644 --- a/tests/test_xnys_calendar.py +++ b/tests/test_xnys_calendar.py @@ -250,3 +250,33 @@ def test_early_close_independence_day_thursday(self): self.assertFalse(self.calendar.is_open_on_minute(wednesday_before)) self.assertTrue(self.calendar.is_open_on_minute(friday_after_open)) self.assertTrue(self.calendar.is_open_on_minute(friday_after)) + + def test_2023(self): + expected_holidays_2023 = [ + pd.Timestamp("2023-01-02", tz="UTC"), # New Years Day + pd.Timestamp("2023-01-16", tz="UTC"), # Martin Luther King, Jr. Day + pd.Timestamp("2023-02-20", tz="UTC"), # Washington's Birthday + pd.Timestamp("2023-04-07", tz="UTC"), # Good Friday + pd.Timestamp("2023-05-29", tz="UTC"), # Memorial Day + pd.Timestamp("2023-06-19", tz="UTC"), # Juneteenth + pd.Timestamp("2023-07-04", tz="UTC"), # Independence Day + pd.Timestamp("2023-09-04", tz="UTC"), # Labor Day + pd.Timestamp("2023-11-23", tz="UTC"), # Thanksgiving Day + pd.Timestamp("2023-12-25", tz="UTC"), # Christmas Day + ] + + early_closes = [ + pd.Timestamp("2023-07-03", tz="UTC"), # Independence Day + pd.Timestamp("2023-11-24", tz="UTC"), # Thanksgiving Day + ] + + for session_label in expected_holidays_2023: + self.assertNotIn(session_label, self.calendar.all_sessions) + + for early_close_session_label in early_closes: + self.assertIn(early_close_session_label, self.calendar.early_closes) + + weekdays = pd.bdate_range(start="2023-01-01", end="2023-12-31", tz="UTC") + bdays = weekdays[~weekdays.isin(expected_holidays_2023)] + for session_label in bdays: + self.assertIn(session_label, self.calendar.all_sessions) From 3c9eb262490ca7e8b9830d08deb3705f90823bd5 Mon Sep 17 00:00:00 2001 From: Sercan Turkmen Date: Tue, 13 Dec 2022 10:21:14 +0900 Subject: [PATCH 3/5] feat(ci): remove deprecated python targets --- .github/workflows/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a65af7f..f580b71b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,12 +15,10 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: [2.7, 3.5, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] include: - - python-version: 2.7 - requirements_file: requirements_locked_old.txt - - python-version: 3.5 - requirements_file: requirements_locked_old.txt + - python-version: 3.7 + requirements_file: requirements_locked.txt - python-version: 3.8 requirements_file: requirements_locked.txt - python-version: 3.9 From 91136a74e56e7cf9b84d6556138a61dc175af597 Mon Sep 17 00:00:00 2001 From: Sercan Turkmen Date: Tue, 13 Dec 2022 10:33:00 +0900 Subject: [PATCH 4/5] style: fix lint --- tests/test_xnys_calendar.py | 12 ++++++++---- tests/test_xtks_calendar.py | 6 +++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/test_xnys_calendar.py b/tests/test_xnys_calendar.py index 6d83cf56..bdecbdf3 100644 --- a/tests/test_xnys_calendar.py +++ b/tests/test_xnys_calendar.py @@ -254,7 +254,7 @@ def test_early_close_independence_day_thursday(self): def test_2023(self): expected_holidays_2023 = [ pd.Timestamp("2023-01-02", tz="UTC"), # New Years Day - pd.Timestamp("2023-01-16", tz="UTC"), # Martin Luther King, Jr. Day + pd.Timestamp("2023-01-16", tz="UTC"), # Martin Luther King Jr. Day pd.Timestamp("2023-02-20", tz="UTC"), # Washington's Birthday pd.Timestamp("2023-04-07", tz="UTC"), # Good Friday pd.Timestamp("2023-05-29", tz="UTC"), # Memorial Day @@ -273,10 +273,14 @@ def test_2023(self): for session_label in expected_holidays_2023: self.assertNotIn(session_label, self.calendar.all_sessions) - for early_close_session_label in early_closes: - self.assertIn(early_close_session_label, self.calendar.early_closes) + for session_label in early_closes: + self.assertIn(session_label, self.calendar.early_closes) - weekdays = pd.bdate_range(start="2023-01-01", end="2023-12-31", tz="UTC") + weekdays = pd.bdate_range( + start="2023-01-01", + end="2023-12-31", + tz="UTC", + ) bdays = weekdays[~weekdays.isin(expected_holidays_2023)] for session_label in bdays: self.assertIn(session_label, self.calendar.all_sessions) diff --git a/tests/test_xtks_calendar.py b/tests/test_xtks_calendar.py index 7d0be775..c3fa1517 100644 --- a/tests/test_xtks_calendar.py +++ b/tests/test_xtks_calendar.py @@ -311,7 +311,11 @@ def test_2023(self): for session_label in expected_holidays_2023: self.assertNotIn(session_label, self.calendar.all_sessions) - weekdays = pd.bdate_range(start="2023-01-01", end="2023-12-31", tz="UTC") + weekdays = pd.bdate_range( + start="2023-01-01", + end="2023-12-31", + tz="UTC", + ) bdays = weekdays[~weekdays.isin(expected_holidays_2023)] for session_label in bdays: self.assertIn(session_label, self.calendar.all_sessions) From 10e5f58c0d4ebc6839f0b3cdfef74f1b5e984668 Mon Sep 17 00:00:00 2001 From: Sercan Turkmen Date: Tue, 13 Dec 2022 14:56:54 +0900 Subject: [PATCH 5/5] feat(xtks): add 2023 vernal equinox --- tests/resources/xtks.csv | 1 - trading_calendars/xtks_holidays.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/resources/xtks.csv b/tests/resources/xtks.csv index 5f8ab3a4..528d7bd9 100644 --- a/tests/resources/xtks.csv +++ b/tests/resources/xtks.csv @@ -5688,7 +5688,6 @@ 2023-03-16,2023-03-16 00:01:00,2023-03-16 06:00:00 2023-03-17,2023-03-17 00:01:00,2023-03-17 06:00:00 2023-03-20,2023-03-20 00:01:00,2023-03-20 06:00:00 -2023-03-21,2023-03-21 00:01:00,2023-03-21 06:00:00 2023-03-22,2023-03-22 00:01:00,2023-03-22 06:00:00 2023-03-23,2023-03-23 00:01:00,2023-03-23 06:00:00 2023-03-24,2023-03-24 00:01:00,2023-03-24 06:00:00 diff --git a/trading_calendars/xtks_holidays.py b/trading_calendars/xtks_holidays.py index 421387be..fc21a073 100644 --- a/trading_calendars/xtks_holidays.py +++ b/trading_calendars/xtks_holidays.py @@ -90,6 +90,7 @@ def sunday_to_wednesday(dt): Timestamp('2020-03-20'), Timestamp('2021-03-20'), Timestamp('2022-03-21'), + Timestamp('2023-03-21'), ] # The Golden Week holidays (late April - early May) are listed in reverse