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.

TABLE 2.12

Best Parameter Sets of Keltner Channel Algorithm

Ranking Based on Average Trade

No.

Net

Profit

Max.

Drawdown

Sharpe

Ratio

#Trades

Avg

Profit/Loss

Avg

Bars Held

%of

Winners

Len

Width

397 $576,442 −$216,503 0.19 1193 483.19 44.77 36.88 10 3

400 $1,131,833 −$291,100 0.18 2648 427.43 42.88 36.44 16 3

431 $1,497,797 −$399,590 0.17 3568 419.79 43.92 37.3 78 3

398 $755,357 −$277,970 0.17 1804 418.71 44.11 37.03 12 3

432 $1,500,595 −$394,719 0.17 3598 417.06 43.59 37.13 80 3

Ranking Based on Net Profit

No.

Net

Profit

Max.

Drawdown

Sharpe

Ratio

#Trades

Avg

Profit/Loss

Avg

Bars Held

%of

Winners

Len

Width

180 $1,626,520 −$406,001 0.14 7293 223.02 29.87 29.14 80 1.25

141 $1,623,026 −$420,401 0.13 8051 201.59 28.45 27.76 74 1

140 $1,622,844 −$415,479 0.13 7974 203.52 28.83 27.77 72 1

179 $1,606,297 −$409,864 0.14 7243 221.77 30.21 29.32 78 1.25

103 $1,596,825 −$422,709 0.13 9129 174.92 26.26 25.74 70 0.75

and the second set was derived by sorting by net profit. Table 2.12 shows the same

metrics for the Keltner Channel algorithm.

And the winner is? Tough call—I lean toward the Bollinger Bands because of

the higher Sharpe ratios. The Sharpe ratio is just an indicator of consistency, and

we will go over it and many more performance metrics in the next chapter. One

thing that does stand out is the holding periods of the two systems and how different

they are. The profit/loss is somewhat similar but the Bollinger algorithm holds on

to trades anywhere from 20 to 50 percent longer. There might be some synergy

here. Diversification is not only achieved through different markets but also through

different algorithms.

■ Summary

Another chapter, and still no Holy Grail. However, using indicators as building

blocks might get you very close to one. Several oscillators and trend indicators were

discussed but these are just a few out of many. The overall purpose of this chapter was

to show how to integrate these indicators into a trading algorithm. The flowcharts

and FSM diagrams that were introduced in Chapter 1 were carried over and used

to help explain this integration. Pseudocode was also used to demonstrate how the

indicators can be programmed. Keep in mind the actual computer code will be

75

STOCHASTICS AND AVERAGES AND RSI! OH, MY!

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!