OVERVIEW OF MACHINE LEARNING
Machine learning is defined as a subsection of artificial intelligence that uses algorithms to find patterns in data to make predictions about future events. In machine learning, a dataset of observations called instances are comprised of a number of variables called attributes. Within the area of machine learning, I will be using supervised learning. Supervised learning means that we model datasets that contain labeled instances. In other words, each instance can be thought of as a datapoint (x,y). Each x is an independent attribute that is our input, while the y is our correlated target attribute (or output). Supervised learning models train on historical data that is already labeled. Once, the model is trained, it can then be utilized on new data for prediction. The new input data contains only known feature values, and it has to predict the output. Since the future direction of the stock market becomes known after each instance, we are able to apply a supervised learning model for prediction.
Overall, the layout of a simplified supervised learning problem can be broken down into the following steps:
- Data acquisition
- Data cleaning
- Train/test split (type splitting our data into a training set and test set)
- Training the model (using the training set)
- Testing our model’s accuracy (using our test set)
- Adjusting the model’s parameters (including the number of epochs, batch size, number of neurons, optimization function, loss function etc.) based on performance
- Deploy the model for the prediction of future values [11]
- Model evaluation (evaluate the prediction results of our model by calculating the error between the real and predicted values)
Limitations of Machine Learning
Although there has been measured success with the implementation of machine learning algorithms, there are still some potential pitfalls of using this modeling method. One root of these potential issues is the instability of the markets. There may be brief periods where the market is highly predictable under certain approaches, but as more traders spot a certain pattern and adjust their technique to it, the patterns may cease to be predictable—a phenomenon called “concept drift” [12]. To avoid concept drift, a good predictive model would have to anticipate concept drift. One way to do so would be creating and storing a number of models that apply to specific market conditions and constantly updates based on incoming prices and throwing out old data. However, maintaining models with the most up-to-date price data is not necessarily the best approach. The market may stability and old knowledge may become useful again, meaning that the most recent price knowledge may not be the most pertinent to the current market situation. Given this consideration, another possible option to avoiding concept drift would be to retrain with ever-growing set of data. Still, this option is not the most feasible because constantly retraining on a huge dataset is time-consuming, which is an especially negative consequence in high-frequency trading where timing matters to profits. Thus, the ideal solution to concept drift is assuming that it occurs and building this assumption into our model.
Illustration of the Basics of Concept Drift: