From 31294e46482f01a9a5970ee4a4435cc2491df6ba Mon Sep 17 00:00:00 2001 From: wegamekinglc Date: Sun, 2 Feb 2020 15:30:33 +0800 Subject: [PATCH] update china calendar for Coronavirus event --- .../Analysis/TechnicalAnalysis/StatefulTechnicalAnalysers.pyx | 4 ++-- PyFin/DateUtilities/Calendar.pyx | 2 +- PyFin/tests/DateUtilities/testCalendar.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/PyFin/Analysis/TechnicalAnalysis/StatefulTechnicalAnalysers.pyx b/PyFin/Analysis/TechnicalAnalysis/StatefulTechnicalAnalysers.pyx index 6864356..f574409 100644 --- a/PyFin/Analysis/TechnicalAnalysis/StatefulTechnicalAnalysers.pyx +++ b/PyFin/Analysis/TechnicalAnalysis/StatefulTechnicalAnalysers.pyx @@ -255,8 +255,8 @@ cdef class SecurityMovingLogReturn(SecuritySingleValueHolder): cdef class SecurityMovingResidue(SecuritySingleValueHolder): - def __init__(self, window, x): - super(SecurityMovingResidue, self).__init__(window, MovingResidue, x) + def __init__(self, window, x, y): + super(SecurityMovingResidue, self).__init__(window, MovingResidue, x, y) def __str__(self): if self._compHolder: diff --git a/PyFin/DateUtilities/Calendar.pyx b/PyFin/DateUtilities/Calendar.pyx index 795fd60..65221eb 100644 --- a/PyFin/DateUtilities/Calendar.pyx +++ b/PyFin/DateUtilities/Calendar.pyx @@ -455,6 +455,7 @@ cdef set sse_holDays = {Date(2005, 1, 3), Date(2020, 1, 28), Date(2020, 1, 29), Date(2020, 1, 30), + Date(2020, 1, 31), Date(2020, 4, 6), Date(2020, 5, 1), Date(2020, 5, 4), @@ -601,7 +602,6 @@ cdef set ib_working_weekends = { Date.westernStyle(12, Months.October, 2019), # 2020 Date.westernStyle(19, Months.January, 2020), - Date.westernStyle(1, Months.February, 2020), Date.westernStyle(26, Months.April, 2020), Date.westernStyle(9, Months.May, 2020), Date.westernStyle(28, Months.June, 2020), diff --git a/PyFin/tests/DateUtilities/testCalendar.py b/PyFin/tests/DateUtilities/testCalendar.py index f328506..bdd0c25 100644 --- a/PyFin/tests/DateUtilities/testCalendar.py +++ b/PyFin/tests/DateUtilities/testCalendar.py @@ -120,7 +120,7 @@ def testChinaSSE(self): Date(2019, 10, 6), Date(2019, 10, 7), # China Shanghai Securities Exchange holiday list in the year 2020 Date(2020, 1, 1), - Date(2020, 1, 24), Date(2020, 1, 25), Date(2020, 1, 26), Date(2020, 1, 27), Date(2020, 1, 28), Date(2020, 1, 29), Date(2020, 1, 30), + Date(2020, 1, 24), Date(2020, 1, 25), Date(2020, 1, 26), Date(2020, 1, 27), Date(2020, 1, 28), Date(2020, 1, 29), Date(2020, 1, 30), Date(2020, 1, 31), Date(2020, 4, 4), Date(2020, 4, 5), Date(2020, 4, 6), Date(2020, 5, 1), Date(2020, 5, 2), Date(2020, 5, 3), Date(2020, 5, 4), Date(2020, 5, 5), Date(2020, 6, 25), Date(2020, 6, 26), Date(2020, 6, 27), @@ -177,7 +177,6 @@ def testChinaIB(self): Date(2019, 10, 12), # China Inter Bank working weekend list in the year 2020 Date(2020, 1, 19), - Date(2020, 2, 1), Date(2020, 4, 26), Date(2020, 5, 9), Date(2020, 6, 28),