Description
Hello,
I originally sent this to NorgateData but they requested that I post it here as well.
https://pypi.org/project/zipline-norgatedata/#how-to-install-zipline-using-anaconda-miniconda
On the Pypi Zipline-Norgatedata page with the Exchange Calendar Issues that require patching I believe I may have found an additional issue that requires patching involving the date_rules for week_start() and week_end().
When I followed the information provided on the website in order to patch the “YYYY-mm-dd etc.” issue that is located around line 519 in events.py, I still received the error when I used the week_start() and week_end() date_rules (the issue did not present itself with the daily() or month_start() date_rules.
I went through the traceback error that comes up in Spyder IDE when I run the code with the change made to line 519 in the class TradingDayOfMonthRule, and it looped me back to line 472 which actually has the exact same function (name and code) within the class TradingDayOfWeekRule. Once I updated the code at line 472 with the same code change at line 519 I was able to successfully use the week_start() and week_end() functions.
I am honestly unsure if this is an issue for anyone else, but I thought since I came upon this that I would pass it along to NorgateData.
I have attached screen shots below to show the original lines of code in the events.py file and the updated lines that I changed to get week_start() and week_end() to work.
Original
After Update
I hope this helps anyone dealing with week_start() and week_end()