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 8.4

Out-of-Sample Testing

Le Se Lx Sx Begin Date End Date Bars Profit Max DD

20 20 12 10 2005/06/15–2006/07/07 244 4, 031.25 −2, 562.50

20 20 12 10 2006/07/07–2007/06/27 244 4, 437.50 −3, 093.75

20 20 16 10 2007/06/27–2008/06/25 244 −3, 437.50 −10, 343.75

20 24 12 12 2008/06/26–2009/04/07 244 8, 968.75 −7, 343.75

20 20 12 14 2009/04/07–2010/04/16 244 −6, 437.50 −13, 187.50

20 36 10 14 2010/06/04–2011/03/29 244 8, 250.00 −2, 093.75

20 20 12 14 2011/04/18–2012/04/06 244 −2, 500.00 −17, 562.50

20 24 12 14 2012/04/06–2013/03/27 244 −1, 937.50 −11, 562.50

20 56 10 14 2013/03/27–2014/04/04 244 −4, 062.50 −13, 187.50

24 24 12 14 2014/04/04–2015/03/18 244 1, 718.75 −5, 156.25

9, 031.25

252

GENETIC OPTIMIZATION, WALK FORWARD

years, it should overhang or carry over into the subsequent year. A practitioner of

this school of thought also believes the market is changing and a trading algorithm

must change or adapt as well. Table 8.4 shows the WFO of this system on the

30-year bond going back to 2001. Notice how the results start in 2005. The system

backed up to 2001 and derived the best parameter set for those four years and then

traded that set starting in June 2005 and ending in July 2006.

When July 2006 arrived, the system then switched to the second parameter set.

These parameters were derived using data from 2002 through 2005 (refer back to

table 3—second row). The WFO swapped parameters on an annual basis. Overall,

the system was profitable, but the walk-forward efficiency was only 19.03 percent,

and it lost 5 out of 10 years. Why did this happen? The only answer is the lack of

optimization overhang in the out-of-sample periods.

System TA2 used the default WFO settings:

Walk-forward runs = 10; in this test, the computer switched parameters 10 times

over the history of the test. This works out to be about once a year. If the test

period had been 20 years, then the WFO would have switched every 2 years.

OOS% = 20%; this percentage informs the computer to utilize 80 percent of

each interval’s data (in-sample) to determine the best parameter set and then

carry that parameter set forward 20 percent of the interval (out-of-sample).

If these settings are changed, then the number of bars used for optimization and

the number of bars those optimizations are carried forward will change as well.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!