AutoReg in statsmodels

57 Views Asked by At

I am the AutoReg model in statsmodels

I am getting some very off results on my predictions which is making me think I am doing something incorrectly.

I am using teslas shareprice form yahoo finance:

ticker = yf.Ticker("TSLA")
observed = ticker.history(period="1d", start="2014-01-01",end="2022-03-01")["Close"]
training_data = np.log(observed['2014-01-01':'2021-01-01'])

tesla_model= AutoReg(training_data, lags=3).fit()

predictions=tesla_model.model.predict(tesla_model.params, start=len(training_data), end= len(training_data)+len(test_data)-1)

The results are shown in the table below. Predicted in using another function, more manual and AutoReg Predictions is using the predictions obtained through the above code.

enter image description here

If someone can shed some light as to why there are vastly different results or what I am doing incorrectly that would be great.

Thanks in advance

0

There are 0 best solutions below