Time Series Analysis Algorithm In Python Definition