0

I have created a stock trend prediction model with sentiment analysis but I am confused of the relationship between training test split and shifting window for time series.

Is the shifting window used for validation and train-test split separates the data for the model? Or are the two interchangeable?

I know the train-test split procedure is used to estimate the performance of machine learning algorithms when they are used to make predictions on data not used to train the model. But I don't understand why a sliding window is used in existing literature?

Thank you for the help :)

  • 1
    Are you asking why researchers use shifting windows instead of ordinary cross-validation? Does this thread answer your question? https://stats.stackexchange.com/questions/14099/using-k-fold-cross-validation-for-time-series-model-selection – Sycorax Aug 14 '21 at 16:39
  • I am trying to find out if I need to do a train-test split and sliding window or is it just one them I need to deploy? – user16561849 Aug 14 '21 at 16:55

1 Answers1

0

You don't want the test data to contain information that is more recent than the train data. If that were the case the model has a free peak into the future which is never the case in the real world. That is why you need the sliding window.

Jayaram Iyer
  • 198
  • 5