Quantcast
RSS Feeds | Advertise | Subscribe | Contact Us
Futures Magazine.

News

Web Exclusives

 Artificial intelligence: A comeback story 

 
Print This Article
Return To Article
Normal Text
Large Text
Many segments of the field of study involving artificial intelligence have found their way into the trading industry today. There are individual types of networks and related methods such as kernel regression. In addition, there are several different types of genetic algorithms and machine induction.

The influx of these tools began in force with the 1990s. Neural networks were the new buzzword in trading, and nearly all large traders and institutions invested heavily in this technology. During the mid 1990s, genetic algorithms and machine learning bloomed. With only a few exceptions, this first boom period was not a success. Most of the trading strategies developed did not hold up in the future. The primary reasons were:

1) Analysts tried to make neural networks and other artificial intelligent methods do too much. They made them the heart of the system. If the network failed, so did the system.

2) Unique technical factors, such as how neural networks start from random weights and produce different results each time you train them, caused them to fall out of favor.

It is now 20 years since the first neural network boom started, and they are making a comeback, not just neural networks, but other advanced technologies such as genetic algorithms, machine rule induction, fuzzy logic and chaos theory.

During the first two boom periods, these technologies were taken in isolation. For example, one developer would focus on neural networks; another would apply only genetic programming. The present trend involves integrating multiple technologies. If we review the professional journals in this field, we see that for most of the period 2001-06, scholars wrote few articles that applied a.i. methods to trading. Now, academic research in this area is booming once again.

In this, the first of a multi-part series on artificial intelligence’s comeback, we’ll overview past attempts and examine why this comeback may be different.

 

A BRIEF HISTORY

Neural network technology takes its cue from the human brain by emulating its structure. Work on neural networks was started in the 1940s and was followed in 1957 by the advent of Frank Rosenblatt’s “Perceptron,” which was a linear classifier, or the simplest kind of feed forward neural network (see “Perceptron simplified,” above).

The neuron is the basic structural unit of a neural network. If the neuron receives enough signals, the neuron fires and triggers all of its outputs. A neuron receives any number of inputs, possessing weights based on their importance. With a real neuron, the weighted inputs are summed and output is based on a threshold function sent to every neuron downstream. Finally, all of the impulses are passed along until the output layer is reached and the output signals are translated into real work information.

Although this system worked well for simple problems, it was demonstrated in 1969 that non-linear classifications called “exclusive/or” problems were impossible to solve. The exclusive/or problem is a simple real-world problem. For example, it is possible to go shopping or to the movies, but it is not possible to do both at the same time (see “Pick and choose” ).

 

Neural networks represent a branch of computing science called machine learning, which includes two major branches, namely supervised and unsupervised learning. In supervised learning, applications learn via a teacher and compare the output with the current weights to produce the answer. This is how the original Perceptron worked and this type of neural network is most often used in financial analysis. The calculated value is compared to the actual value and the weights are adjusted to minimize the error across the complete training set. The goal of machine learning is for the neural network to learn the training set well and produce good answers on new cases that have never been seen before.

In 1986, a paper was presented on an algorithm called “back propagation,” announcing the discovery of a method allowing a network to learn to discriminate between not linearly separable classes. The method was called the Backward Propagation of Errors, which was a generalization of the least mean squares (LMS) rule. While the 1986 paper has been credited with popularizing the concept, the credit for inventing back propagation goes to Paul Werbos, who presented the techniques in his 1974 Ph.D. dissertation at Harvard University.


The back propagation algorithm consists of a multi-layer Perceptron, using non-linear threshold, activation functions (see “A simple propagation”). The most common functions are the “Sigmoid,” which ranges from 0 to 1, and the hyperbolic tangent, which ranges from -1 to 1. Because these functions are used in back propagation, all inputs and target outputs need to be mapped into the appropriate range when using these types of networks. The mapping range used is based on function.

However, beyond the technology, perhaps the more significant evolution is occurring in the flesh and blood “neural networks” that are employing the models — that is, the human traders. During the first neural network boom, many analysts tried to predict things such as percent price change five bars in the future with neural networks. They tried to predict market turning points and used simple rules to trade that were 100% dependent on the neural network’s performance. This approach was doomed to failure. Neural networks are not magic. Neural networks are just a fancy type of non-linear regression and need to be viewed in that way.

SURVIVAL IS GENETIC

Genetic algorithms are an optimization tool loosely based on natural selection, and are a simple but powerful tool for evolving rules to create artificial traders. They can be used to select input parameters for neural networks, develop portfolios and asset class models or composite indexes. Genetic algorithms also are useful for developing rules for integrating multiple system components
and indicators.

There are three main components of a genetic algorithm: A way to describe the problem in terms of a genetic code, sort of a DNA chromosome, a way to simulate evolution by creating offspring of the chromosomes, each being slightly different than its parent and a method to evaluate the “goodness” of each of the offspring.

There are eight steps involved in a genetic solution, the first of which in solving a problem using genetic algorithms is to encode the problem into a chromosome (see “Stepping up in the gene pool,” below). Chromosomes are made up of functional blocks called genes; the value of each gene is called an allele. The position of a gene on a given chromosome is called the locus.

There are three popular types of crossovers namely, one-point, two-point and uniform crossovers:

• One-point crossover: Randomly select two adjacent genes on the chromosome of a parent and sever the link between the pair. Do this to both parents. Create one child right-hand side of parent two. The second child will be the reverse using the left-hand side of parent one.

• Two-point crossover: They are similar to the one-point method except two cuts are made in the parents and the genes between those cuts are exchanged to produce children.

• Uniform crossover: Randomly exchange genes between the two parents based on some crossover probability.

When conducting crossovers when the genes of the chromosomes are real numbers or discrete values, instead of simple binary numbers, after we have selected the genes that will be affected by the crossover, we develop other operators to combine them rather than just switching them. Some genetic algorithms occasionally clone some genes of the fit members to produce children.

One important concept of genetic algorithms is called schemata. It refers to similar templates of chromosomes. While working with the binary genes, defining the schemata requires three symbols 0, 1 and * where 0 and 1 are just binary digits and * means that the value for that particular gene is irrelevant (see “Scheming ahead”).

For example, schema 1 is a template requiring genes 1, 2, 3, 6 to be 1. Schema 2 requires a 0 in gene 4 and a 1 in gene 5. Our sample chromosome fits both schemata but this is not always the case. Let’s suppose that we have a population of 100 chromosomes, and 30 of them fit schema 1 and 20 fit schema 2. Now suppose that the average fitness of chromosomes belonging to schema 1 is 0.75 and that of schema 2 is 0.50. The average fitness of the population is 0.375. Hence, schema 1 will have an exponentially increased priority in subsequent generations of reproduction when compared to schema 2.

Schemata also affect crossovers. The longer a schema is, the more easily it can get disturbed by a crossover. The length of a schema is the distance between the innermost and outermost 0 and 1. In our example, schema 1 has a longer defining length.

Different crossovers also have different properties on how they affect combining schemata. For example, there are schemata that cannot be combined without disrupting them using either a one-point or two-point crossover.

Because genetic algorithms can be used for other things like evolving trading rules, in these cases, you must encode the trading rules into these genes. For example, suppose we want to develop trading rules using genetic algorithms. First, we need to develop a general form for our rules, for example:

(Indicator(Length) > Trigger) AND (Indicator(Length)[1] < Trigger) THEN
Place order at open and exit N days later.

In the above, “indicator,” “length,” “trigger,” “place order” and “N” will be coded into our genetic algorithm. We also could have encoded the greater-than or less-than signs, as well as the conjunctive operators (“and” or “or”). To encode this rule, we assign an integer number to each technical indicator we would like to use. For example: the relative strength index = 1, Slow K = 2, etc. The trigger is a simple real number. Place order could be a 1 for a buy and -1 for a sell. N is the number of days to hold the position.

Here is how the following rule can be encoded:

• If the nine-period RSI is greater than 30 and the nine-period RSI one day ago is less than 30, then buy at the open and exit five days later.

• The chromosome for the above rule is: 1,9,30,1,9,30,1,5

 


GENETIC PROGRAMMING

Genetic programming is an evolutionary algorithm-based methodology that uses biological evolution to find computer programs that perform a user-defined task. It is a specialization of genetic algorithms wherein each individual is a computer program. Hence, it is a machine-learning technique used to optimize a population of computer programs according to a fitness landscape determined by a program’s ability to perform a given computational task.

It is much more powerful than GA as its output is another computer program, while that of a genetic algorithm is simply a quantity. Hence, it is considered the beginning of computer programs that program themselves.

Another benefit is it works best for several types of problems. The first type is where no ideal solution exists, such as a program that drives a car. Some solutions might drive safely at the expense of time, while others might drive fast at a high safety risk. Hence, driving a car can mean making compromises between speed versus safety, plus many other variables.

 It is also useful in finding solutions where the variables are constantly changing. In the previous car example, the program will find one solution for a smooth concrete highway, while it will find a totally different solution for a rough unpaved road.

One of the issues with genetic programming is whether non-guided searching of solutions leads to curve-fitted solutions. Another field in genetic algorithms is the grammatical evolution, which is the combination of hints from a domain expert with the power of genetic programming. The hints guide solutions based on expert knowledge. This is an exciting area of research in trading and advance technologies.

WHY THIS TIME IS DIFFERENT

During the first neural network boom, computers ran 200 times slower than present machines. The issues created by having to train multiple neural networks and average their results in 1990 are acceptable today, due to the increase in computer power.

In addition, there are even multi-processor boards, with which hundreds of nets can be traded at once if the software supports these boards.

Besides, we have learned from our past mistakes and realize that signal processing type solutions to the market don’t work. Developing preprocessing for advance technology solutions requires a deep understanding of the markets.

In addition, we have now begun to  incorporate tools like neural networks into applications where failure of the artificial intelligent methods does not mean that you will lose money trading. Any a.i.-based methods must be system fault tolerant. This means that if one component of the system fails — for example, the neural network predictions degrade to the same predictive power as current price change — then the system does not fail. This concept is not new or unique and is at work in many applications, such as on modern aircraft where if the network fails, the plane doesn’t immediately crash.

New solutions will combine classic technical analysis with pattern recognition technology and use advance walk forward technology along with neural nets and kernel regression. The key is developing hybrid solutions combining multiple technologies into this new class of trading techniques.

In our next article, we will examine current research more closely and show a real world example of using advance technologies in trading.    


Murray A. Ruggiero Jr. is a consultant. His firm, Ruggiero Associates, develops
market timing systems. He is the author of "Cybernetic Trading Strategies" (Wiley). E-mail him at ruggieroassoc@aol.com
 

Page 1 of 3123Next Page

Comment on This Article

Name:
Email (will not be published):
Subject:
Comment:

Recent Issues


Archived Issues

Most Read Articles

Related Articles