Artificial Intelligence (AI) exists in our everyday lives. Examples include Siri and Alexa for simple problem solving or pure entertainment, Facebook Feed which promotes content based on your interests, and chatbots on the websites for a quick Q&A. 

 There are two types of learning for Artificial Intelligence (AI) – supervised and unsupervised learning.

 

“Supervised learning occurs when there is a “supervisor” to guide the machine’s learning i.e. the input and output variables are provided and mapped together. Unsupervised learning, on the other hand, is where the AI is provided information which is unsorted. “

 

Supervised Learning

Supervised learning occurs when there is a “supervisor” to guide the machine’s learning i.e. the input and output variables are provided and mapped together.  In addition, there needs to be a huge database of responses (e.g Twitter database) which already contains data to differentiate between posts which are ‘good’ or ‘bad’. Supervised learning is also good in language processing as the answers are quite straightforward and the AI can easily identify the right or wrong answers.  

 

Unsupervised Learning

Unsupervised learning, on the other hand, is where the AI is provided information which is unsorted. There is no “supervisor” and this AI will act on the information without guidance. Unsupervised learning is the best way for the recognition of patterns. For example, neural networks are a set of algorithms that mimic the neurons in human brains to recognize patterns. Such pattern recognition is used by the AI to learn to play games. The learning capability of the AI can be seen from the Go match of AlphaGo and Lee Sedol in March 2016, where the Google AI, AlphaGo won the match against the 18-time world champion. By giving AI games to play, it can quickly show whether the AI performs well based on the score, allowing it to improve along the way. Although it takes relatively longer than supervised learningunsupervised learning allows the AI to generate a multitude of possibilities to solve a problem through trial-and-error, and this allows it to choose the best and most efficient way to solve a given problem. 

Hence, it would be more viable to use unsupervised learning for trading since there is no clear-cut right or wrong answers in trading and there are countless of possibilities and permutations in the trading market. There are two ways to analyze the trading market – Fundamental analysis and Technical analysis. We will focus on Technical analysis here.   

 

Technical Analysis

 

Technical analysis is the idea of predicting future market prices based on the previous market patterns. An example is the simple indicator like exponential moving average (EMA) to predict future trends as shown above. Using the EMA, investors are better able to predict when is a good time to sell or buy stocks. We can buy the stocks at 2 and sell it when the price is higher at either 3 or 4.  

Why are we using technical analysis? This is because we can predict how people are thinking based on their behaviors from Neuro-Linguistic Programming (NLP). Given the previous behaviors of people resulting in a specific pattern of market trends, it is possible for AI to make use of these available historical data to make more accurate predictions for future market prices. If reality turns out to be different, AI will be able to take this as a trial-and-error process and self-learn to make even more accurate predictions in the future. 

An example of a more complex indicator is the Ichimoku Cloud. Basically, the Cloud predicts the trend depending on where the position of the price is with respect to the cloud. The information on this Ichimoku Cloud reflects people’s behaviors and tells us when we should sell or buy the stocks. 

 

Using technical analysis, we can train the AI model to use past market prices to predict the future prices and the Ichimoku Cloud more accurately by making use of a mathematical model and probabilities. ”

 

With historical data of the trading market as a database, we input a simple mathematical function into the AI using Python. Python is a coding language which can be used for various programming purposes like web development and software development.  We then allow it to process the data and let the learning take place to develop the neurons network of the AI. This is how we can make use of AI to help us invest in the stock market.