Hi I am trying to use financial technical Indicators for forecasting, using machine learning models. The usual approach in time series cross validation is to use a moving window or growing window. The methodology I am using is described in the following steps
- Calculate technical indicators TA1, TA2, ....TAN for the whole historical data set, using lag 1
- Then use simple feature selection method like finding out the cross correlation between the independent variables, and remove variables with cross correlation above a certain threshold
- Lag the input variables by one
- Then train the the Machine learning model using a moving window, then reports its performance on the train set
- Test its performance on a test set which was not used in the training process
The issue I am facing is that the results are highly optimistic. My question is should I calculate the technical indicators separately for the train and test and then use them, or should I calculate them for the whole data set in the beginning and then divide them into train and test set.