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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

superfast processors, searching a large search space is extremely time sensitive.

Imagine a trading algorithm (TA1) that has five different parameters that can be

optimized across 50 different values. Assuming a brute force optimization and three

seconds to complete each iteration, it would take the computer almost 30 years

to complete or span the entire search space (search space and optimization range are

also interchangeable terms). Here is the math behind the time needed to complete

this task:

P1(50) ×P2(50) ×P3(50) ×P4(50) ×P5(50) ×3 seconds =

937,500,500 seconds

937,500,500 seconds

= 10,850 days, or 29 years

86,400 seconds∕day

This example is an exaggeration, but it shows multiple parameter optimizations

can be very time consuming. Figure 8.1 shows how quickly the search space grows

as the number of iterations increase for each of the five parameters. This is where

artificial intelligence (AI) comes into play; AI uses brains over brawn. In the above

example, AI can shrink the overall search space by eliminating some values of each

parameter that do not lead to a favorable outcome. In doing so, it cuts down the

number of total iterations, and less iteration means less time.

The first step in the process of incorporating these tools into a trader’s algorithm

development is to understand the basic foundations of GA. Don’t let the words

genetic or algorithms scare you away. They are simply terms to explain how a

solution to a problem can be quickly and solidly uncovered. As we already know,

probably too well, an algorithm is just a set of rules one follows to find a solution to a

problem. Genetic refers to the biological process of evolution through reproduction,

mutation, and survival of the fittest. Remember time is of the essence but so is a good

answer and this type of algorithm provides quick yet robust solutions. Computer

software and biology may seem like strange bedfellows but their synthesis makes up

a large portion in the study of AI.

1200000

1000000

800000

229

GENETIC OPTIMIZATION, WALK FORWARD

600000

400000

200000

0

3 4 5 6 7 8 9 10 11 12 13 14 15 16

FIGURE 8.1

Iteration growth rate of five parameters.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!