Genetic Algorithm
Genetic algorithms are those which are used to mirror human evolution, using Darwin like principles in order to solve problems and predict outcomes.
The concept of natural selection penned by Charles Darwin explained how the concept of “survival of the fittest” is how the human race had continued to evolve over time, with the “best” surviving and progressing in life. Similarly, when looking at how financial neural networks work, genetic algorithms use the Darwin principle of natural selection to ascertain which outcome would be best suited to a specific problem.
A simple analogy of selecting the best outcome of a genetic algorithm would be trying to decide what to pack on your holiday, whereby you are limited to a certain weight and baggage size by the airline. You would therefore need to decide which combination of items are of most value to take with you out of a population sample of say, ten items, such as a laptop, phone, wallet, book, iPad etc.
The algorithms are formed using mathematical vectors, each of which represents a quantity that has a direction and size. From a genetic viewpoint, these vectors would be representative of chromosomes. If the vectors are considered the chromosomes, the individual values would represent genes. Furthermore, using natural selection and the three operations explained below, the genes are then modified to create superior versions.
The main aspects of majority of genetic algorithms are a population of chromosomes, a “selection” of those chromosomes which will be used to “reproduce”, a crossover function to create the next generation, the mutation of chromosomes to add diversity to a sample, and a fitness function which is used for the purposes of optimization. The fitness function is used to assess how effective a chromosome is at solving a particular problem.
Genetic Operations
Crossover
In genetic algorithms, a crossover is an initial operation similar to genetic mating whereby “high value” inputs are “mated” to create an even higher quality output. This is similar to crossing over strong genes in a biological sense in order to create an even stronger offspring, and hence, the similarity to Charles Darwin’s natural selection.
According to Holland, there are several crossover methods consisting of single point, two point, n point and uniform crossovers.
The one point methodology described by Holland is the most straightforward option, and has been known to yield effective results. From a population sample presented as a bit string, two potential candidates are chosen whereby a cross point is chosen at a random point along the bit string. The area to the left of this cut point is “crossed over” from one parent and mixed with the parts to the right of the cut point of the second parent. This then forms a new “child”. This is then done for the opposite parts.
In a numerical sense if the subsequence of a set of chromosomes are (11010111001000) and (01011101010010), and they are crossed over after the fourth bit, then the result of the offspring would be (01010111001000) and (11011101010010).
Mutation
It could be said that crossover is the primary discovery function in genetic algorithms, which is where mutation can be effective in adding variables into the overall mix. When analyzing a crossover, the introduction of a mutation creates a sense of randomness (similar to the mutation of a gene in a biological sense). By doing this, it can actual help in the discovery of potentially new and successful outcome through diversity as opposed to solely relying on what appears to be the “best” options entered into the crossover.
Selection
This is the process of quite simply selecting the “fittest” solutions out of the population entered into the crossover and mutation stages.
Examples of real life use cases – financial markets and trading
Due to its quantitative nature, many individual traders and investors can harness the power of genetic algorithms to make accurate and high yielding financial decisions, be it in the foreign exchange markets or the broader financial markets and trading.
Genetic algorithms allow for a large amount of variables and unforeseen factors to be taken into account, therefore allowing a potential investor to look at the bigger picture when making an investment decision. In the case of stock market trading, using the example of investing in the SP500 index, genetic algorithms can be used to help day traders as well as longer term investors predict entry and selling points. Genetic algorithms can be combined with the Relative Strength Index (RSI) indicators of a stock whereby an RSI under 30 signals a potentially oversold stock and above 70 indicates overbought territory and therefore a strong sell signal in order to further refine a possible outcome. In our example here, we could take a population sample of ten years from 2003 until 2013. With this ten year period being the parameters, an investor could then use genetic algorithms and the results over this period to predict future results using the crossover, mutation and selection operations.
Summary
Genetic algorithms, can help give us a representation of a given outcome or solution, using a function in order to create these solutions. In the case of stock picks and general financial markets, they can be used to take alternate variables into account and help give a more rounded picture of a potential investment instead of solely applying indicators such as the RSI. By using applying the crossover operation, a new breed of outcomes are created which have elements of both “parents”, and to create a more diverse sample the mutation function creates strategic randomness thus allowing new outcomes or “genetic make ups” to be created, and the use of the fitness and selection functions help to create the next generation of outcomes using the Darwin like process of natural selection mentioned earlier, can help to find the best candidates overall.