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.

algorithm and see what parameter sets produce the best profit-to-drawdown ratio.

Let’s not stop at optimizing the lengths of the parameters but the protective stop

as well. The Bollinger Band camp will be happy because not only will we optimize

the parameter lengths, and the protective stop, but we will also optimize the width

of the bands. Does this smell of over-curve-fitting? Sure it does, but we aren’t

developing a trading system here, we are just doing an analysis.

Now that we have a plan, how can we use AmiBroker to carry it out? The

algorithms are already programmed (source code will be graciously provided in the

appendices), but how many optimizations are we talking about? Quickly doing the

math in my head—millions! Table 3.10 shows the exact number of permutations

and the range that each parameter will be tested across.

The number doesn’t get really large until we move to the TMA

optimization—nearly seven million. This is due to the fact that we are optimizing

four parameters. Well, it was a good idea. We will just have to go with what

TABLE 3.10

Comparison of Parameters for Algorithms Based on Different Strategies

Donchian Start Stop Increment # Iterations

94

COMPLETE TRADING ALGORITHMS

Entry Len 9 100 1 92

Exit Len 5 100 1 96

Protective Stop 3000 6000 500 7

Total 61824

Bollinger Start Stop Increment # Iterations

Average Length 20 200 1 181

#Std. Deviations 0.25 3 0.05 56

Protective Stop 3000 6000 500 7

Total 31752

TMA Start Stop Increment # Iterations

Short Length 9 100 1 92

Intermediate Length 19 200 2 91

Long Length 49 399 3 117

Protective Stop 3000 6000 500 7

Total 6856668

DMA Start Stop Increment # Iterations

Short Length 9 100 1 92

Intermediate Length 19 200 2 91

Protective Stop 3000 6000 500 7

Total 58604

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!