distribution of the best bid and ask prices upon the change in either of them. Architecture Each neural network has 4 layers. The standard neural netw

Similar documents
Foreign Exchange Forecasting via Machine Learning

Application of Deep Learning to Algorithmic Trading

International Journal of Computer Engineering and Applications, Volume XII, Issue II, Feb. 18, ISSN

$tock Forecasting using Machine Learning

Predicting stock prices for large-cap technology companies

Two kinds of neural networks, a feed forward multi layer Perceptron (MLP)[1,3] and an Elman recurrent network[5], are used to predict a company's

International Journal of Computer Engineering and Applications, Volume XII, Issue II, Feb. 18, ISSN

Novel Approaches to Sentiment Analysis for Stock Prediction

Stock Market Index Prediction Using Multilayer Perceptron and Long Short Term Memory Networks: A Case Study on BSE Sensex

Based on BP Neural Network Stock Prediction

STOCK MARKET PREDICTION AND ANALYSIS USING MACHINE LEARNING

Deep Learning - Financial Time Series application

Statistical and Machine Learning Approach in Forex Prediction Based on Empirical Data

Deep Learning for Forecasting Stock Returns in the Cross-Section

Stock Price Prediction using Deep Learning

ALGORITHMIC TRADING STRATEGIES IN PYTHON

Forecasting Stock Prices from the Limit Order Book using Convolutional Neural Networks

Performance analysis of Neural Network Algorithms on Stock Market Forecasting

Using Structured Events to Predict Stock Price Movement: An Empirical Investigation. Yue Zhang

STOCK PRICE PREDICTION: KOHONEN VERSUS BACKPROPAGATION

Role of soft computing techniques in predicting stock market direction

Recurrent Residual Network

Stock market price index return forecasting using ANN. Gunter Senyurt, Abdulhamit Subasi

UNDERSTANDING ML/DL MODELS USING INTERACTIVE VISUALIZATION TECHNIQUES

k-layer neural networks: High capacity scoring functions + tips on how to train them

CS221 Project Final Report Deep Reinforcement Learning in Portfolio Management

Scaling SGD Batch Size to 32K for ImageNet Training

Deep Learning for Time Series Analysis

Development and Performance Evaluation of Three Novel Prediction Models for Mutual Fund NAV Prediction

The Use of Artificial Neural Network for Forecasting of FTSE Bursa Malaysia KLCI Stock Price Index

Deep Portfolio Theory

LendingClub Loan Default and Profitability Prediction

Deep learning analysis of limit order book

Deep Learning in Asset Pricing

Application of Innovations Feedback Neural Networks in the Prediction of Ups and Downs Value of Stock Market *

AN ARTIFICIAL NEURAL NETWORK MODELING APPROACH TO PREDICT CRUDE OIL FUTURE. By Dr. PRASANT SARANGI Director (Research) ICSI-CCGRT, Navi Mumbai

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2012, Mr. Ruey S. Tsay. Solutions to Final Exam

Abstract Making good predictions for stock prices is an important task for the financial industry. The way these predictions are carried out is often

Stock Trading Following Stock Price Index Movement Classification Using Machine Learning Techniques

Artificially Intelligent Forecasting of Stock Market Indexes

arxiv: v1 [cs.ce] 11 Sep 2018

arxiv: v1 [cs.lg] 21 Oct 2018

Gradient Descent and the Structure of Neural Network Cost Functions. presentation by Ian Goodfellow

Predicting Economic Recession using Data Mining Techniques

Leverage Financial News to Predict Stock Price Movements Using Word Embeddings and Deep Neural Networks

Stock Price Prediction using Recurrent Neural Network (RNN) Algorithm on Time-Series Data

The Influence of News Articles on The Stock Market.

Alpha-Beta Soup: Mixing Anomalies for Maximum Effect. Matthew Creme, Raphael Lenain, Jacob Perricone, Ian Shaw, Andrew Slottje MIRAJ Alpha MS&E 448

Keywords: artificial neural network, backpropagtion algorithm, derived parameter.

An enhanced artificial neural network for stock price predications

Iran s Stock Market Prediction By Neural Networks and GA

arxiv: v3 [q-fin.cp] 20 Sep 2018

Improving Stock Price Prediction with SVM by Simple Transformation: The Sample of Stock Exchange of Thailand (SET)

COGNITIVE LEARNING OF INTELLIGENCE SYSTEMS USING NEURAL NETWORKS: EVIDENCE FROM THE AUSTRALIAN CAPITAL MARKETS

Forecasting stock market prices

Lecture 4 - k-layer Neural Networks

A Comparative Study of Ensemble-based Forecasting Models for Stock Index Prediction

Internet Appendix. Additional Results. Figure A1: Stock of retail credit cards over time

Business Strategies in Credit Rating and the Control of Misclassification Costs in Neural Network Predictions

Improving Long Term Stock Market Prediction with Text Analysis

Bond Market Prediction using an Ensemble of Neural Networks

arxiv: v2 [cs.lg] 13 Jun 2017

Journal of Internet Banking and Commerce

A Machine Learning Investigation of One-Month Momentum. Ben Gum

MS&E 448 Final Presentation High Frequency Algorithmic Trading

Cognitive Pattern Analysis Employing Neural Networks: Evidence from the Australian Capital Markets

Backpropagation and Recurrent Neural Networks in Financial Analysis of Multiple Stock Market Returns

A Novel Prediction Method for Stock Index Applying Grey Theory and Neural Networks

Nonlinear Manifold Learning for Financial Markets Integration

arxiv: v2 [stat.ml] 19 Oct 2017

Stock Prediction Using Twitter Sentiment Analysis

Academic Research Review. Algorithmic Trading using Neural Networks

Model Calibration with Artificial Neural Networks

STOCK MARKET FORECASTING USING NEURAL NETWORKS

Universal features of price formation in financial markets: perspectives from Deep Learning. March 20, 2018

Alternate Models for Forecasting Hedge Fund Returns

An introduction to Machine learning methods and forecasting of time series in financial markets

Machine Learning for Physicists Lecture 10. Summer 2017 University of Erlangen-Nuremberg Florian Marquardt

Draft. emerging market returns, it would seem difficult to uncover any predictability.

Neuro-Genetic System for DAX Index Prediction

Applications of Neural Networks in Stock Market Prediction

Machine Learning for Volatility Trading

Using Deep Learning to Detect Price Change Indications in Financial Markets

Session 5. Predictive Modeling in Life Insurance

Summary of the thesis

ARTIFICIAL NEURAL NETWORK SYSTEM FOR PREDICTION OF US MARKET INDICES USING MISO AND MIMO APROACHES

Extreme Market Prediction for Trading Signal with Deep Recurrent Neural Network

Multi-factor Stock Selection Model Based on Kernel Support Vector Machine

Barapatre Omprakash et.al; International Journal of Advance Research, Ideas and Innovations in Technology

Predictive Model Learning of Stochastic Simulations. John Hegstrom, FSA, MAAA

Design and Application of Artificial Neural Networks for Predicting the Values of Indexes on the Bulgarian Stock Market

Wide and Deep Learning for Peer-to-Peer Lending

Applications of machine learning for volatility estimation and quantitative strategies

HKUST CSE FYP , TEAM RO4 OPTIMAL INVESTMENT STRATEGY USING SCALABLE MACHINE LEARNING AND DATA ANALYTICS FOR SMALL-CAP STOCKS

Y. Yang, Y. Zheng and T. Hospedales. Updated: 2016/09/21. Queen Mary, University of London

Visual Attention Model for Cross-sectional Stock Return Prediction and End-to-End Multimodal Market Representation Learning

Outline. Neural Network Application For Predicting Stock Index Volatility Using High Frequency Data. Background. Introduction and Motivation

Chapter IV. Forecasting Daily and Weekly Stock Returns

Forecasting Foreign Exchange Rate during Crisis - A Neural Network Approach

Quantitative investment Based on Artificial Neural Network Algorithm

Transcription:

A Survey of Deep Learning Techniques Applied to Trading Published on July 31, 2016 by Greg Harris http://gregharris.info/a-survey-of-deep-learning-techniques-applied-t o-trading/ Deep learning has been getting a lot of attention lately with breakthroughs in image classification and speech recognition. However, its application to finance doesn t yet seem to be commonplace. This survey covers what I ve found so far that is relevant to systematic trading. Please tell me if you know of some research I ve missed. Acronyms: DBN = Deep Belief Network LSTM = Long Short-Term Memory MLP = Multi-layer Perceptron RBM = Restricted Boltzmann Machine ReLU = Rectified Linear Units CNN = Convolutional Neural Network Limit Order Book Modeling Sirignano (2016) predicts changes in limit order books. He has developed a spatial neural network that can take advantage of local spatial structure, is more interpretable, and more computationally efficient than a standard neural network for this purpose. He models the joint distribution of the best bid and ask at the time of the next state change. Also, he models the joint

distribution of the best bid and ask prices upon the change in either of them. Architecture Each neural network has 4 layers. The standard neural network has 250 neurons per hidden layer, and the spatial neural network has 50. He uses the tanh activation function on the hidden layer neurons. Training He trained and tested on order books from 489 stocks from 2014 to 2015 (a separate model for each stock). He uses Level III limit order book data from the NASDAQ with event times having nanosecond decimal precision. Training involved 50TB of data and used a cluster with 50 GPUs. He includes 200 features: the price and size of the limit order book across the first 50 non-zero bid and ask levels. He uses dropout to prevent overfitting. He uses batch normalization between each hidden layer to prevent internal covariate shift. Training is done with the RMSProp algorithm. RMSProp is similar to stochastic gradient descent with momentum but it normalizes the gradient by a running average of the past gradients. He uses an adaptive learning rate where the learning rate is decreased by a constant factor whenever the training error increases over a training epoch. He uses early stopping imposed via a validation set to reduce overfitting. He also includes an l^2 penalty when training in order to reduce overfitting. Results He shows that limit order books exhibit some degree of local spatial structure. He predicts the order book 1 second ahead and also at the time of the next bid/ask change. The spatial neural network outperforms the standard neural network and logistic regression with non-linear features. Both neural networks have 10% lower error than logistic regression. Price-based Classification Models Dixon et al. (2016) use a deep neural network to predict the sign of the price change over the next 5 minutes for 43 commodity and forex futures. Architecture Their input layer has 9,896 neurons for input features made up of lagged price differences and co-movements between contracts. There are 5 learned fully-connected layers. The first of the four hidden layers contains 1,000 neurons, and each subsequent

layer tapers by 100 neurons. The output layer has 135 neurons (3 for each class {-1, 0, 1} times 43 contracts). Training They used the standard back-propagation with stochastic gradient descent. They speed up training by using mini-batching (computing the gradient on several training examples at once rather than individual examples). Rather than an nvidia GPU, they used an Intel Xeon Phi co-processor. Results They report 42% accuracy, overall, for three-class classification. They do some walk-forward training instead of a traditional backtest. Their boxplot shows some generally positive Sharpe ratios from the mini-backtests for each contract. They did not include transaction costs or crossing the bid-ask spread. All their predictions and features were based on the mid-price at the end of each 5-minute time period. Takeuchi and Lee (2013) look to enhance the momentum effect by predicting which stocks will have higher or lower monthly returns than the median. Architecture They use an auto-encoder composed of stacked RBMs to extract features from stock prices which they then pass to a feed-forward neural network classifier. Each RBM consists of one layer of visible units and one layer of hidden units connected by symmetric links. The first layer has 33 units for input features from one stock at a time. For every month t, the features include the 12 monthly returns for month t-2 through t-13 and the 20 daily returns approximately corresponding to month t. They normalize each of the return features by calculating the z-score relative to the cross-section of all stocks for each month or day. The number of hidden units in the final layer of the encoder is sharply reduced, forcing dimensionality reduction. The output layer has 2 units, corresponding to whether the stock ended up above or below the median return for the month. Final layer sizes are 33-40-4-50-2. Training During pre-training, they split the dataset into smaller, non-overlapping mini-batches. Afterwards, they un-roll the RBMs to form an encoder-decoder, which is fine-tuned using back-propagation. They consider all stocks trading on the NYSE, AMEX, or NASDAQ with a price greater than $5. They train on data from 1965 to 1989 (848,000 stock-month samples) and test on data from 1990 to 2009 (924,300 stock-month samples). Some training data held-out for validation for the number of layers and the number of units per layer.

Results Their overall accuracy is around 53%. When they consider the difference between the top decile and the bottom decile predictions, they get 3.35% per month, or 45.93% annualized return. Batres-Estrada (2015) predicts which S&P 500 stocks will have above-median returns for each given day, and his work appears to be heavily influenced by Takeuchi and Lee (2013). Architecture He uses a 3-layer DBN coupled to an MLP. He uses 400 neurons in each hidden layer, and he uses a sigmoid activation function. The output layer is a softmax layer with two output neurons for binary classification (above median or below). The DBN is composed of stacked RBMs, each trained sequentially. Training He first pre-trains the DBN module, then fine-tunes the entire DBN-MLP using back-propagation. The input includes 33 features: monthly log-returns for months t-2 to t-13, 20 daily log-returns for each stock at month t, and an indicator variable for the January effect. The features are normalized using the Z-score for each time period. He uses S&P 500 constituent data from 1985 to 2006 with a 70-15-15 split for training-validataion-test. He uses the validation data to choose the number of layers, the number of neurons, and the regularization parameters. He uses early-stopping to prevent over-fitting. Results His model has 53% accuracy, which outperforms regularized logistic regression and a few MLP baselines. Sharang and Rao (2015) use a DBN trained on technical indicators to trade a portfolio of US Treasury note futures. Architecture They use a DBN consisting of 2 stacked RBMs. The first RBM is Gaussian-Bernoulli (15 nodes), and the second RBM is Bernoulli (20 nodes). The DBN produces latent features which they try feeding into three different classifiers: regularized logistic regression, support vector machines, and a neural network with 2 hidden layers. They predict 1 if portfolio goes up over 5 days, and -1 otherwise. Training They train the DBN using a contrastive divergence algorithm. They calculate signals based on open, high, low, close, open interest, and volume data, beginning in 1985, with some points removed during the 2008 financial crisis. They use 20 features: the daily trend calculated over different time frames, and then normalized. All parameters are chosen using a validation dataset. When training the neural net classifier, they mention using a

momentum parameter during mini-batch gradient descent training to shrink the coefficients by half during every update. Results The portfolio is constructed using PCA to be neutral to the first principal component. The portfolio is an artificial spread of instruments, so actually trading it is done with a spread between the ZF and ZN contracts. All input prices are mid-prices, meaning the bid-ask spread is ignored. The results look profitable, with all three classification models performing 5-10% more accurately than a random predictor. Zhu et al. (2016) make trade decisions using oscillation box theory based on DBNs. Oscillation box theory says that a stock price will oscillate within a certain range in a period of time. If the price moves outside the range, then it enters into a new box. The authors try to predict the boundaries of the box. Their trading strategy is to buy the stock when it breaks through the top boundary or sell it when it breaks through the bottom boundary. Architecture They use a DBN made up of stacked RBMs and a final back-propagation layer. Training They used block Gibbs sampling to greedily train each layer from lowest to highest in an unsupervised way. They then train the back-propagation layer in a supervised way, which fine-tunes the whole model. They chose 400 stocks out of the S&P 500 for testing, and the test set covers 400 days from 2004 to 2005. They use open, high, low, close prices as well as technical analysis indicators, for a total of 14 model inputs. Some indicators are given more influence in the prediction through the use of gray relation analysis or gray correlation degree. Results In their trading strategy, they charge 0.5% transaction costs per trade and add a couple of parameters for stop-loss and transaction rate. I don t fully understand the result tables, but they seem to be reporting significant profits. Text-based Classification Models Rönnqvist and Sarlin (2016) predict bank distress using news articles. Specifically, they create a classifier to judge whether a given sentence indicates distress or tranquility.

Architecture They use two neural networks in this paper. The first is for semantic pre-training to reduce dimensionality. For this, they run a sliding window over text, taking a sequence of 5 words and learning to predict the next word. They use a feed-forward topology where a projection layer in the middle provides the semantic vectors once the connection weights have been learned. They also include the sentence ID as an input to the model, to provide context and inform the prediction of the next word. They use binary Huffman coding to map sentence IDs and word to activation patterns in the input layer, which organizes the words roughly by frequency. They say feed-forward topologies with fixed context sizes are more efficient than recurrent neural networks for modeling text sequences. The second neural network is for classification. Instead of a million inputs (one for each word), they use 600 inputs from the learned semantic model. The first layer has 600 nodes, the middle layer has 50 rectified linear hidden nodes, and the output layer has 2 nodes (distress/tranquil). Training They train it with 243 distress events over 101 banks observed during the financial crisis of 2007-2009. They use 716k sentences mentioning the banks, taken from 6.6m Reuters news articles published during and after the crisis. Results They evaluate their classification model using a custom Usefulness measure. The evaluation is done using cross-validation, leaving N banks out in each fold. They aggregate the distress counts into various timeseries but don t go so far as to consider creating a trading strategy. Fehrer and Feuerriegel (2015) train a model to predict German stock returns based on headlines. Architecture They use a recursive autoencoder with an additional softmax layer in each autoencoder for estimating probabilities. They perform three-class prediction {-1, 0, 1} for the following day s return of the stock associated with the headline. Training They initialize the weights with Gaussian noise, and then update through back-propagation. They use an English ad-hoc news announcement dataset (8,359 headlines) for the German market covering 2004 to 2011. Results Their recursive autoencoder has 56% accuracy, which in an improvement over a more traditional random forest modeling approach with 53% accuracy. They do not develop a trading strategy.

They have made a Java implementation of their code publicly available. Ding et al. (2015) use structured information extracted from headlines to predict daily S&P 500 moves. Headlines are processed with Open IE to obtain structured event representations (actor, action, object, time). A neural tensor network learns the semantic compositionality over event arguments by combining them multiplicatively instead of only implicitly, as with standard neural networks. Architecture They combine short-term and long-term effects of events, using a CNN to perform semantic composition over the input event sequence. They use a max pooling layer on top of the convolutional layer, which makes the network retain only the most useful features produced by the convolutional layer. They have separate convolutional layers for long-term events and mid-term events. Both of these layers, along with an input layer for short-term events, feed into a hidden layer which then feeds into two output nodes. Training They extracted 10 million events from Reuters and Bloomberg news. For training, they corrupt events by replacing one event argument with a random argument. During training, they assume that the actual event should be given a higher score than the corrupted event. When it isn t, model parameters get updated. Results They find that structured events are better features than words for stock market prediction. Their approach outperforms baseline methods by 6%. They make predictions for the S&P 500 index and 15 individual stocks, and a table appears to show that they can predict the S&P 500 with 65% accuracy. Volatility Prediction Xiong et al. (2015) predict the daily volatility of the S&P 500, as estimated from open, high, low, close prices. Architecture They use a single LSTM hidden layer consisting of one LSTM block. For inputs they use daily S&P 500 returns and volatilities. They also include 25 domestic Google trends, covering sectors and major areas of the economy.

Training They used the Adam method with 32 samples per batch and mean absolute percent error (MAPE) as the objective loss function. They set the maximum lag of the LSTM to include 10 successive observations. Results They show their LSTM method outperforms GARCH, Ridge, and LASSO techniques. Portfolio Optimization Heaton et al. (2016) attempt to create a portfolio that outperforms the biotech index IBB. They have the goal of tracking the index with few stocks and low validation error. They also try to beat the index by being anti-correlated during periods of large drawdowns. They don t directly model the covariance matrix, rather it is trained in the deep architecture fitting procedure, which allows for nonlinearities. Architecture They use auto-encoding with regularization and ReLUs. Their auto-encoder has one hidden layer with 5 neurons. Training They use weekly return data for the component stocks of IBB from 2012 to 2016. They auto-encode all stocks in the index and evaluate the difference between each stock and its auto-encoded version. They keep the 10 most communal stocks that are most similar to the auto-encoded version. They also keep a varying number of other stocks, where the number is chosen with cross-validation. Results They show the tracking error as a function of the number stocks included in the portfolio, but don t seem to compare against traditional methods. They also replace index drawdowns with positive returns and find portolios that track this modified index. Related Links Stock Market Forecasting using deep learning? (reddit.com) deep learning in finance (reddit.com) Leveraging Google DeepMind software and Deep Learning to play the stock market(reddit.com)

They might be Robots, Using data for investment management and trading (youtube.com) Introducing Binatix: A Deep Learning Trading Firm That s Already Profitable (recode.net) Will AI-Powered Hedge Funds Outsmart the Market? (technologyreview.com) Adaptive deep learning empowers traders (automatedtrader.net) Deep Learning in Finance (slideshare.net) Prediction of Exchange Rate Using Deep Neural Network (slideshare.net) References Batres-Estrada, B. (2015). Deep learning for multivariate financial time series. abstract Ding, X., Zhang, Y., Liu, T., & Duan, J. (2015, June). Deep learning for event-driven stock prediction. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence (ICJAI) (pp. 2327-2333). abstract Dixon, M. F., Klabjan, D., & Bang, J. H. (2016). Classification-based Financial Markets Prediction using Deep Neural Networks. Available at SSRN 2756331. abstract Fehrer, R., & Feuerriegel, S. (2015). Improving Decision Analytics with Deep Learning: The Case of Financial Disclosures. arxiv preprint arxiv:1508.01993. abstract Heaton, J. B., Polson, N. G., & Witte, J. H. (2016). Deep Portfolio Theory. arxiv preprint arxiv:1605.07230. abstract Rönnqvist, S., & Sarlin, P. (2016). Bank distress in the news: Describing events through deep learning. arxiv preprint arxiv:1603.05670. abstract Sharang, A., & Rao, C. (2015). Using machine learning for medium frequency derivative portfolio trading. arxiv preprint arxiv:1512.06228. abstract

Sirignano, J. A. (2016). Deep Learning for Limit Order Books. arxiv preprint arxiv:1601.01987. abstract Takeuchi, L., Lee, Y. (2013). Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks. abstract Xiong, R., Nicholas, E. P., & Shen, Y. (2015). Deep Learning Stock Volatilities with Google Domestic Trends. arxiv preprint arxiv:1512.04916. abstract Zhu, C., Yin, J., & Li, Q. (2014). A stock decision support system based on DBNs. Journal of Computational Information Systems, 10(2), 883-893. abstract