31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

John Holland’s 1975 book titled Adaptation in Natural and Artificial Systems is the

bible on GA and his work has paved the way for a majority of researchers in this

field. Holland has stated, 1 ‘‘Living organisms are consummate problem solvers.

They exhibit a versatility that puts the best computer programs to shame.’’

Computer speed and power has come a long way since 1975 and you may think

these biologically based optimization/search algorithms have become obsolete. The

exponential growth rate of multiple variable optimizations proves that this is not the

case. Also humans are constantly creating more and more complex problems that

continually exceed our technology. The relationship between GA and computers is

as close as it has ever been.

The principles that make up GA, if taken one concept at a time, are easy to

understand. The combining of these concepts into a complete algorithm can be

daunting if each piece is not broken down. I programmed these concepts in a

modular manner using VBA for Excel in a very small amount of time. This same

software was used to illustrate the concepts and solve the initial problem in this first

part of the chapter. Snippets of VBA code will be sprinkled throughout the first part

of the chapter to help explain the most important components of genetic algorithms.

230

GENETIC OPTIMIZATION, WALK FORWARD

■ Computers, Evolution, and Problem Solving

Genetic algorithms borrow the following concepts from biology:

Population and generations

Selection of the fittest

Reproduction

Mutation

All these terms are easily understood in a biological framework but may not seem

initially translatable into a computer/software/math paradigm. The application of

these concepts to solve a complex problem can be difficult but we need not worry

ourselves with this because we know our objective with TradeStation, AmiBroker,

or Excel—building the world’s best trading algorithms! However, a simple problem

needs to be solved so we can demonstrate the eloquence of GA. The ideas and

processes that will be discussed for applying a GA to finding a solution to a simple

equation were derived directly from Denny Hermawanto’s paper titled ‘‘Genetic

Algorithm for Solving Simple Mathematical Equality Problem.’’ The problem that

we will be solving utilizes this very simple equation:

a+2b+3c+d= 40

1 John H. Holland. Genetic algorithms. Scientific American, 267(1):44–50, 1992.

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!