Mentor: Prof. Umit Uyar
Algorithmic trading contributes to a majority of the action in stock exchanges, accounting for around 70% of the total trading volume in the United States, and about 40% of the trade volumes in developing nations such as India. With this in mind our project was to develop an algorithm that would predict closing market prices for any specified security more accurately than are currently being predicted, and take appropriate action based on these predictions (buy, sell, hold). Our predicting algorithm used the machine learning technique known as neural networks, which is a model that will be explained in a further section. Our algorithm was first developed in Python with the Anaconda package, and was then imported into Quantopian, which was the competition we continuously entered. Our algorithms were successful, since they always had positive returns, and some have even made it to the top 10% of the competition!
Neural Networks-Man's Attempt at Replicating the Brain
The human brain is comprised of over 100 billion neuron cells, each rapidly firing impulses through their synapses by adding all their input signals together and firing when the sum of these signals reaches a level called the action potential. The idea behind neural network machine learning is to imitate this action potential of a neuron and to learn the importance of each input signal to a neuron.
Figure 1: Deep Neural Network
A machine learning neural network can be visualized by Figure 1. There are three main portions to the neural network. There is the input layer, the hidden layers, and the output layer. The input layer corresponds to values which should have some relationship with the output. In our case the input values were different financial indicators, for example simple moving average, momentum, and current price, while the output node, what we were trying to predict, was today's closing price of a stock. The inputs get multiplied by weights which are shown as lines in Figure 1. At each node in both the hidden and output layer, all of the values from the previous layer are multiplied by their connecting weights and then summed together at the input of the next node. This then becomes the value of that node which will to be passed on to the output. Our algorithm started with a random set of weights, and using a method known as back-propagation, we were able to train the neural network to find the correct set of weights to correctly predict today's closing price.
Our Trading Strategy
The main idea behind our strategy is rather simple. If the price of a given stock is predicted to go up then we buy as much as that stock that we can with the money allotted to it plus a ∆ amount. Similarly, if the price is expected to down, we will sell all of our shares and short a ∆ amount. However, we don’t want to respond so drastically to every minuscule change in price. Therefore we only buy and sell if the price is expected to change by a minimal threshold value. We used this strategy in conjunction with beta hedging.
Beta hedging involves reducing the beta, the overall market risk, of a portfolio, by purchasing stocks with offsetting betas. This was implemented by first calculating the beta value for each stock that we were trading and determining the total market exposure of our portfolio. Once we had this value we would either buy or sell that value of market shares to reduce our exposure to the market.
( L to R ): Ariel Morad, Josh Rutta, Prof. Umit Uyar, Eli Katz