# How can I stabilise a recurrent neural network used for binary classification?

I’m looking for some help with my neural network. I’m working on a binary classification on a recurrent neural network that predicts stock movements (up and down) Let’s say I’m studying Eur/Usd, I’m using all the data from 2000 to 2017 to train et I’m trying to predict every day of 2018.

The issue I’m dealing with right now is that my program is giving me different answers every time I run it even without changing anything and I don’t understand why?

The accuracy during the train from 2000 to 2017 is around 95% but I’ve noticed another issue. When I train it with 1 new data every day in 2018, I thought 2 epochs was enough, like if it doesn’t find the right answer the first time, then it knows what the answer is since the problem is binary, but apparently that doesn’t work.

Do you guys have any suggestion to stabilize my NN?

• do you think stock movements is a mathematical function? – user8426627 Jun 19 '19 at 0:05
• I’m obviously not gonna get 80% of accuracy, and that’s not my goal anyway, I’m just trying to stabilise the prediction for now – neomatriciel Jun 19 '19 at 7:53

Firstly, dealing with the issue that the program gives different answers every time without making any changes can be due to a couple of things.

• Assigning random values to weights and bias. This can be solved by setting a seed manually at the start of the program.
• Make sure you have set the model to the testing mode after training. For some frameworks, this has to be done manually.

• Regarding the training for 2018 data, the most probable cause of this loss in accuracy is the fact that there is not enough data for the model to train on. In the first case, you have 356 days * 18 years data points, but of 2018 you seem to have only 365 days data points. – skillsmuggler Jun 20 '19 at 20:13