Auto regressive model in python