Neural Network and Futures
A long short-term memory machine learning algorithm has been applied to the two-hour data of agricultural and energy futures. The delicately implemented algorithm is able to predict the future movement of the contracts approximately two or three days ahead. A special method of standardization has been employed so that the data fed into the model can be best captured and simulated inside the model for future prediction. Numbers of hidden layers (the neurons) are chosen for each futures contract differently so that it can monitor the price movement more accurately. In order to avoid over-fitting, the rolling window size has been fixed to be two days ahead. The algorithm can pick up the large movement of the contracts and predict it ahead of time, which is essential in trading since timing is everything.