I need to perform walk forward optimization on time series. The attached image shows a diagram of how this should be done. I have to perform my data processing function on e