# Strange behavior of CNN when forecasting time series

I have a time series containing 5 features. I tried to use LSTM to predict the next 112 periods in the series. However, I got very bad results. So I tried to use CNN.

First, it did not work properly when using a lot of data for training, and it was not possible to find the characteristics of the series. By decreasing the data, leaving only 224 data for training and 224 for validation, CNN can find the data pattern but results in overfitting (Final epoch: loss: 4.7838e-15 - val_loss: 0.0971).

The strange behavior observed is that even though it results in overfitting, it manages to generalize and predict better future values than when using some kind of regularizer. Does anyone have an explanation for this? Any tips to improve predictions in this case?

The code:

model = Sequential()