The algo worked very well when I ran the back test for 2014 whole year, but the algo could not run the back test when I change the testing period to 2018-01-03 to 2018-01-18. There is no hint about it and it works good three months ago and I did not change the algo. I am not sure if the data set in quantopian went wrong or something else happened.