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?
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.


Secondly, regarding your expected results.

To generate a proper accuracy metric, you will have to sample your dataset into training and testing data, making sure there is now overlap between them. This might be an issue as you have stated training on data till 2017 and then again training on data of 2018.

Lastly, don't expect that the model will know that the output is wrong and directly change it because it's binary classification. This is not how neural networks work. The model fits the solution better by gradually updating its weights and biases over a number of iterations. So it will take a number of epochs to learn new trends in the data for 2018.