Skip to content Skip to sidebar Skip to footer

Statsmodel Predict Start And End Indices

I am trying to implement the prediction function from statsmodel package prediction = results.predict(start=1,end=len(test),exog=test) The dates of the input, test, and the output

Solution 1:

The indices should be any datetime-like values, including pandas' timestamps. If you use a business-day frequency from pandas then this should work, though holidays may present a problem here given that it's not standardized. You may be able to use their custom holiday calendar support though and get what you want.

As I've mentioned in your other questions, without a fully reproducible example, there's not much I can say about what you get given what you put in, though this should work if you give the correct index. If there's no periodic frequency to the dates. E.g., weekends and holidays are excluded without telling the index that, then there's no way to predict what dates you'll want out of sample.

Post a Comment for "Statsmodel Predict Start And End Indices"