Time-series data cannot use random K-Fold; walk-forward (rolling-window) validation must be used instead: the training set contains only past time steps and the validation set is the immediately following future window — step 1 trains on
[0,t] and validates on
[t,t+h], step 2 rolls to train on
[0,t+s] and validate on
[t+s,t+s+h], and so on until the data is covered. The iron rule is no future information: any preprocessing computed with future statistics (means, targets, global normalization parameters) causes temporal leakage and inflates validation scores. For hyperparameter tuning, nested CV is used: an outer rolling loop for model evaluation and an inner loop for hyperparameter search, avoiding selection bias.