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.

TABLE 3.13

The Best Results for the Donchian Algorithm for In-Sample Time Period

Name

Net

Profit

CAR

Max.

Sys

DD

Profit

Factor

Ulcer

Index

#

Trades

Avg

P/L

Avg

Bars

Held

%

Winners

Entry Exit

Stop

Dollars

Donchian 466438 3.9 −57391 2.21 2.27 324 1439.62 46 40.74 64 26 5000

Donchian 417508 3.55 −55451 2.33 1.72 272 1534.96 45.46 40.07 95 28 3000

Donchian 420843 3.57 −56764 2.36 1.98 262 1606.27 46.6 43.13 99 26 4500

Donchian 421760 3.58 −56764 2.31 1.94 262 1609.77 47.39 43.51 97 26 5500

Donchian 421849 3.58 −56764 2.35 1.98 263 1603.99 46.61 42.97 98 26 4500

Donchian 421762 3.58 −56764 2.34 1.92 260 1622.16 47.47 43.85 98 26 5500

Donchian 420241 3.57 −56764 2.34 1.72 261 1610.12 48.18 41.76 96 28 4000

TABLE 3.14

Results for the Donchian Algorithm when Walked Forward across an

Out-of-Sample (OOS) Time Period

Name

Net

Profit

CAR

Max.

Sys

DD

Profit

Factor

Ulcer

Index

#

Trades

Avg

P/L

Avg

Bars

Held

%

Winners

<Portfolio> 25678 0.45 −166243 1.08 8.2 161 159.49 41.32 32

AD0_E0B −16980 −0.31 −29050 0.61 1.83 20 −849 39 25

C20_E0B −18413 −0.33 −35138 0.53 2.25 21 −876.79 39.14 33

CL20_E0B 11230 0.2 −39180 1.23 1.82 19 591.05 32 26

CU0_E0B 37713 0.66 −24450 2.99 1.14 13 2900.96 51.54 31

HG20_E0B −16438 −0.3 −28638 0.62 1.87 19 −865.13 33.74 32

KW20_E0B 1463 0.03 −14725 1.07 0.54 19 76.97 41.95 32

RB0_E0B −2927 −0.05 −60503 0.96 2.93 21 −139.4 29.9 14

SB20_E0B 15918 0.28 −12749 2.68 0.89 17 936.33 52.59 53

TY0_E0B 14113 0.25 −8084 2.54 0.37 12 1176.05 66.67 50

Well, at least the system made some money. However, the drawdown is just

way too great. What did we do wrong? We did all our homework—picked a fairly

diversified portfolio and a robust parameter set. How could we have been so far off?

Out of pure sick curiosity, I optimized the algorithm across the OOS data to see

how far off we missed the target. Table 3.15 has the best parameters sets for our

small portfolio over the OOS timespan.

Boy, were we way off! A couple of the best parameter sets had the exit length

parameter greater than the entry length—illogical, you say! In these situations, the

system becomes a reversal system until it is stopped out with the money management

stop. I am almost too scared to continue, but like looking at a car accident, let’s

103

COMPLETE TRADING ALGORITHMS

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!