Simple Finance Prediction using Deep Learning
Currently, a significant amount of financial negotiations are already made by computers, which take into account several factors (news, market turmoil, past quotations) and try to predict future movements of the assets. These algorithms add liquidity money to the market.
This project is a just simple prediction using Deep Learning. The data used for training and network accuracy testing are historical data that it was got from Yahoo finance. The libraries used in this project were Pandas, Tensorflow, numpy and others.
The neural network was designed to predict the quotation of the day using the past 30 adj. close (the features). However, it does not make much sense to judge the network based only on the adj. close price, because many factors can influence the closing value. This neural network has two internal layers, the first with 10 and the second with five neurons, the learning rate of 0.001, with cost function Mean Squared Error, iterating 7000 times. The modification of the biases’ layers are constant and the weight uses the normal distribution with 0 mean and 0.1 of standard deviation.
Feedfoward Neural Network CODE
The feedforward neural network was the first and simplest type of artificial neural network devised. In this network, the information moves in only one direction, forward, from the input nodes, through the hidden nodes (if any) and to the output nodes. There are no cycles or loops in the network.
Results
This plot is a candle stick plot of the data
This plot is a style of financial chart used to describe price movements of a security, derivative, or currency.
It is the prediction plot. the blue line is the adj. close of the data and the red line is the prediction of the adj. close
Conclusion
Obviously, there is still a lot of work to be done. There are several other trial options. We can also goal the trend of the market which in this case is the best option, or use indicators such as moving average and use other features, or even create networks that analyze news and identify whether the market is optimistic or pessimistic. This is just a simple project that uses Tensorflow on Financial Market, but in my opinion, all the possibilities to use Deep Learning on the financial market are fascinating.
“Just as electricity transformed almost everything 100 years ago, today I actually have a hard time thinking of an industry that I don’t think Artificial Intelligence will transform in the next several years.” - Andrew NG