Primer on Machine Learning and Useful Applications in Finance - ECE-180D-WS-2024/Wiki-Knowledge-Base GitHub Wiki

Introduction

Machine Learning (ML) is a subset of artificial intelligence used in an increasing variety of applications. Examples include healthcare, marketing and advertising, retail, manufacturing, image recognition, and logistics. It differs from other computational methods in that it does not require explicit commands or programming, but instead learns through a training process involving iteratively processing data, extracting patterns, and adjusting its internal parameters to improve performance over time. Machine learning has proven to be useful in the finance world with its implementation in credit scoring, fraud detection, market analysis and much more.

Origins:

The history of Machine Learning begins around the mid-20th century. The earliest instance of the Machine Learning concept appeared in 1943 with the publication of the first mathematical modeling of a neural network with the purpose of developing algorithms that mimic human thought processes. One of the first milestones being in 1952 with Arthur Samuel’s checkers-playing program that was the world’s first self-learning game program.

Theory:

Machine learning systems improve from experience, making them capable of making predictions or decisions based on data. They are constituted by three main parts.

The first is a decision process. Machine learning algorithms are used to make some prediction or classification based on some data. This input data can be labeled or unlabeled, and the algorithm will produce an estimate about a certain pattern from the data.

The second part involves the use of an error function. This error function serves as a feedback loop evaluating the prediction of the model. If known examples exist, the error function helps in making comparisons to assess the model’s accuracy.

The third part is the model optimization process. Here weights are adjusted to reduce discrepancies between the model estimate and the known example. This serves the purpose of better fitting the model to the data points in the training set. This process of evaluation and optimization is repeated intervalley by the algorithm until a specific threshold accuracy is achieved. These three components allow for a dynamic model that on its own, refines and enhances its precision. The data collection methods employed by these learning models can be customized to suit their specific applications.

The four main models used for machine learning are supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning.

In supervised learning, algorithms are already supplied with labeled training data by data scientists and variables that the algorithm assesses for correlations are also defined by data scientists beforehand. The input and output are also specified. This machine learning model is mainly used for tasks involving, binary classification, multiclass classification, ensembling, and regression modeling.

In unsupervised machine learning by contrast, algorithms do not require labeled data. Instead, algorithms are used to sift through unlabeled data and look for patterns that can be used to group data points. These type of machine algorithms are used in clustering, anomaly detection, association, and dimensionality reduction tasks. One downside to unsupervised learning is that it requires much more data than supervised learning to reach a similar accuracy threshold.

Semi-unsupervised combines elements of the previous two models to provide a hybrid model that uses a mix of small amounts of labeled and unlabeled training data, a set of categories and suggestions. This model can be used in areas such as machine translation, fraud detection, and labeling data.

The reinforcement learning model is based upon a system of rewards and punishments learned through trial and error, with the goal of seeking the maximum reward.

Understanding machine learning models is crucial because they enable us to leverage data effectively, make informed decisions, automate processes, and unlock insights. Additionally, understanding these models allows for critical evaluation, interpretation of results, and identification of potential biases or limitations, ensuring responsible and effective deployment of machine learning solutions.

Neural Networks:

Modern machine learning research is heavily focused on neural networks. Neural networks (NNs) are a class of machine learning models. They are composed of many nodes, or neurons, with weights between the nodes. NNs are generally trained using supervised learning. Inputs are fed into the network, and computations are propagated through the complex network until the end is reached and a task-specific output is determined. An error is evaluated, and weights are updated iteratively. Possible outputs include classification and text generation. Nonlinearity is a critical aspect of NNs. Many popular functions exist, such as ReLU (Rectified Linear Unit) and GELU (Gaussian Error Linear Unit). The simplest (and extremely effective) nonlinearity, ReLU, passes forwards the input value if it is positive, and passes 0 otherwise. The nonlinearity function is one example of a hyperparameter. Hyperparameters are "knobs" that are set by the engineer before training begins, and remain at a particular setting during the entire duration of training. While weights are learned through training, hyperparameters are predetermined, set values. Hyperparameters are critical to trainings NNs. Similar models trained on identical datasets may see drastically different results for different hyperparameters settings.

Layers of a NN consist of a matrix multiplication, where the values of nodes are modified by the weights to the next layer, followed by the nonlinear function. Neural networks are a general classification of models, and there exists many subsets. Deep neural networks (DNNs) are neural networks with many layers. Any neural network applied is almost certainly a DNN, since larger networks are usually more capable of learning datasets. Recurrent neural networks (RNNs) allow passing values to previous nodes, implementing a kind of feedback loop. Finally, LSTMs (Long-Short Term Memory) are a type of RNN that addresses some issues generally present in RNNs. Transformers (the T in ChatGPT) are a relatively nascent DNN. A metric called “attention” is implemented, allowing the network to simulate human attention, making transformers particularly good at generative tasks from a text input prompt.

Although NNs are a small subset of all machine learning models, they are at the forefront of machine learning research. Multiple subsets of NNs exist, each with their own benefits and troubles, and choosing the type of network to implement may dramatically affect the success of a given task. Generally, models developed to predict financial movements find the greatest success in RNNs and LSTMs.

Financial Applications:

Machine learning has proven itself to be a useful tool in the world of finance, because of its ability to analyze millions of data sets within a relatively short time frame to improve outcomes or make predictions without having to be explicitly programmed. This facilitates business processes, informed decisions, and removes much of the mystery out of identifying and making sense of market trends or outcomes. Its dominance in the finance world today is a testament to its versatility.

Some of the most common use cases of machine learning in finance include stock Market forecasting: Machine learning algorithms are often used to predict stock prices which can influence trading decisions. Large existing historical data sets are used to make these informed predictions. Another is business process automation where machine learning is implemented by organizations to automate menial tasks such as data entry and financial monitoring, freeing up time for employees to focus on matters that require more immediate human intervention.

While initially appearing abstract, machine learning has tangible and relatable applications that can impact individuals daily. For instance, ML-powered fraud detection systems monitor financial transactions in real-time, flagging suspicious activities and anomalies indicative of fraudulent behavior. By leveraging advanced anomaly detection algorithms and pattern recognition techniques, these systems mitigate financial losses and safeguard against fraudulent activities, such as identity theft, money laundering, and insider trading. Additionally, financial institutions employ ML algorithms to evaluate creditworthiness, assess loan applications, and determine optimal lending terms. By analyzing borrowers' credit histories, income levels, and other relevant factors, ML models generate accurate credit scores and facilitate data-driven lending decisions Furthermore, in the realm of risk management and prevention, machine learning leverages existing historical data and probability theory to identify potential risks. This capability aids in supporting investment decisions and developing robust risk management strategies of small or large firms.

Current Capabilities:

For decades, algorithmic trading has dominated the stock market scene. It is estimated that 85% of all trades in U.S. stock markets were performed by algorithms. Machine learning research is shifting the scene from mathematical models to neural networks. In place of financial mathematicians designing complex mathematical models, neural networks implicitly learn patterns in the market through extensive training. Currently, neural networks show promising results. A 2017 paper implemented an LSTM, citing an accuracy of 55.9% when predicting whether a stock would increase or decrease in valuation. Training and testing was performed on a select few stocks on the B3 stock exchange, a Brazilian market. While a positive result, it is far from groundbreaking. A random guess would have an accuracy of 50%. Further, stocks generally trend upwards in the long term. Always predicting stocks would increase may easily reach an accuracy above 50%. Stock market prediction is an active area of research for neural networks, and while current models do not outperform algorithm trading, models developed in the next 5-10 years may easily surpass current predictive measures.

Conclusion

In conclusion, machine learning represents a paradigm shift in the way financial institutions analyze data, make decisions, and manage risks. By harnessing the power of ML algorithms, organizations gain valuable insights, streamline operations, and unlock new opportunities for growth and innovation. As the finance industry continues to embrace digital transformation, understanding the fundamentals of machine learning and its diverse applications is essential for staying competitive in a rapidly evolving landscape. In the coming decades, algorithmic trading is likely to be replaced in some capacity by neural networks. As new models are developed, the advantage of machine learning may tower over traditional algorithms. We will see a machine learning arms race waged between major financial institutions, fueled by large-scale data harvesting operations.

References:

  1. Casey, Kevin. “How to Explain Machine Learning in Plain English.” The Enterprisers Project, enterprisersproject.com/article/2019/7/machine-learning-explained-plain-english. Accessed 13 Feb. 2024.
  2. “Machine Learning (in Finance): Overview and Applications.” Corporate Finance Institute, 21 Nov. 2023, corporatefinanceinstitute.com/resources/data-science/machine-learning-in-finance/.
  3. “Machine Learning in Finance: 10 Applications and Use Cases.” Coursera, www.coursera.org/articles/machine-learning-in-finance. Accessed 13 Feb. 2024.
  4. Tucci, Linda, and Ed Burns. “What Is Machine Learning and How Does It Work? In-Depth Guide.” Enterprise AI, TechTarget, 15 Sept. 2023, www.techtarget.com/searchenterpriseai/definition/machine-learning-ML.
  5. “What Is Machine Learning?” IBM, www.ibm.com/topics/machine- learning#:~:text=the%20next%20step- ,What%20is%20machine%20learning%3F,rich%20history%20with%20machine%20learning. Accessed 13 Feb. 2024.
  6. Nelson, Pereira, and Oliveira. "Stock Market's Price Movement Prediction With LSTM Neural Networks." IEEE, 2017, https://ieeexplore.ieee.org/document/7966019.
  7. Esmailian, Parichehr. "What are 3 examples of Neural Networks?" LinkedIn, 2023, https://www.linkedin.com/pulse/what-3-examples-neural-networks-parichehr-esmailian/.