Finance and Investment Industry
Using Genetics Programming To Model Stock Trading Returns
The Australian National University. Australia.
Research By: Francis Lim.
Project Categories: Data-Mining, Data Cleansing, Financial Modelling, Numerical Analysis
Genetic Programming may be more powerful than neural networks or other machine learning techniques. (Koza, 1992).
Genetic Programming (GP) is a search technique developed by Koza (1992) which is based on Genetic Algorithms (GA) pioneered by Holland (1975) and Goldberg (1989). Both GP and GA techniques are based on the principles of natural evolution in which GP combines biological metaphors gleaned from Darwin’s theory of evolution with computer science approaches drawn from the field of machine learning to create programs that are capable of adapting and optimizing trading rules.
The basic concept of GP is that it emulates the evolutionary processes of living systems. “Survival of the fittest” is the key phrase that describes how this method works. Just like a living system, there is a population and an environment in which consists of a population of solution candidates or rule sets, each of which is evaluated according to a problem-specific functions that measures the fitness of how good the solution is to the problem. The rule sets are recombined through crossover and mutation to obtain a new or offspring rule sets. Similarly to natural selection, the rule sets with higher fitness measures are more likely to reproduce new rules sets, which are evaluated again till the evolution process is stopped whenever certain terminating criteria are met. Thus, the conditions of the environment dictate the evolution of the population created initially by randomly assembling functions of individual set of rules that contain operators, variables and constants in which constructs the genetic program.
According to Wang (2000), the major difference between GA and GP is the representation of the solution candidates. In GA, a solution candidate is called a chromosome, which is a string of characters with a fixed length. For a specific problem, chromosomes are mapped to the specific solution domain of the problem. In GP, a solution candidate is represented as a tree-like structure. Each node of the tree is a function, or building block, that takes the output of its branch nodes as inputs and produces an output. If function requires no input it becomes a terminal node to the root of the tree. The size, shape and content of the tree structure can change dynamically during the evolution process. The dynamic nature of the solution structure makes GP more flexible and potentially more useful than GA.
A systems model is particularly well designed to assist in bypassing many of the stopping points that are built into the personalities of traders. To the extend that the result is built into the programming strategy, the system can bypass the stopping points that interfere with clear thinking and strategic implementation. (Jurik, 1999).
The combination of techniques from genetic programming (GP) and moving average (MA) along with the recognition of a short-term price patterns which is the key principle to determine a robust trading strategy. The assumptions and principles behind the development of trading forecasting system (Tadion, 1996) which use as a trading strategy guideline for building an AI financial trading system are as follows:
· Setting specific rules objectives and select stocks to meet the objectives.
· Every trade must follow a rule-based strategy.
· The strategy is to use statistical regularities in the outcome of a Boolean logic signaling – True/False for position buy/entry, buy-hold and sell/exit.
· The trading strategy must be statistically profitable and there is no certainty that any trade will win or lose.
· An accounting period is to be chosen using actual/training data. The accounting period should contain a sufficiently large number of trades.
· Regularities are in the form bias or cycle, always limit losses, ride profits with irrespective of all other rules.
· It is expected to make a profit at the end of the accounting period.
· The trading performance is to be monitored, not the forecasting performance.
· Action based on observations and conclusions draw from analysis, evaluate objective achievement, with adjustment when conclusions change.
The GP rule induction looks at each rule and searches the best one that can be applied as reviewed earlier. The forecast trading signal that can occur from the rule is added to the GP knowledge base. The facts (See Table 1) derived from the best rules subsequently constitute to the GP knowledge base. The loop stops when enough knowledge is acquired to make a decision in order to forecast the trading signals for buy/entry, buy-hold or sell/exit trading position. Through this method, I developed the 8 sets of GP rule induction trading strategy (See Table 2) to implement the design and development of this GP stock trading system.
Table 1 Genetic Programming (GP) Knowledge Base
Table 2 Trading Strategy Rule - Genetic Programming (GP) for Rule Induction
The representation of facts in Table 1 now occurs by mapping the trading strategy rules defined in Table 2 as building blocks to construct the GP binary tree decision structure. Table 3 shows the overview of the Eligibility Rules used for forecasting trading signals. The following eligibility rules applied are: Buy signal – Rule (1 & 3), Buy-Hold signal - Rule (1, 3 & 4), Sell signal – Rule 5, Rule 6, Rule 7 or Rule (2 & 8).
Table 3 Overview of the Eligibility Rules used for Forecasting Trading Signals