meanreversion takes into account closing price of stock make data folder with file names for each symbol saved by its symbol name (/home/Desktop/Data/symbol_name.csv) you need to add path to your data folder at line 31 (/home/Desktop/Data) you need to add start and end date at line 50 & 51 respectively you need to add symbol name short term period = 5 days long term period = 120 days checks for current price greater than long term average checks for current price less than short term average gives list of symbols fulfilling above conditions Note: Only for educational purpose. no guaranteed returns