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.

software-derived optimal set is selected (15 OOS% with 25 runs), then the following

parameters are suggested to be used for next 111 days.

1. movAvgLen 150

2. pivotHiLookBack 4

3. pivotHiStrength 1

4. pivotLowLookBack 5

5. pivotLowStrength 1

6. LprofitObjective 1150

7. LstopLoss 350

8. SprofitObjective 950

9. SstopLoss 500

10. longExitDays 13

11. shortExitDays 14

Now the question that started this part of the chapter can be answered. The

WFO is an incredible tool that can help determine if a trading algorithm needs to be

retrained periodically and also if the algorithm demonstrates sufficient robustness to

match to some degree the results that were derived during its training.

258

■ Monte Carlo Analysis

GENETIC OPTIMIZATION, WALK FORWARD

As we have seen, walk-forward analysis can tell us much about an algorithm’s

robustness. Another tool that can reveal algorithm robustness is Monte Carlo

simulation. The key to this form of simulation can be found in random numbers.

Once you develop what you consider a good trading algorithm and test it against

historical data, you then can really put it to the test by using random numbers and

the historical trade history.

This trade history that is generated by testing your algorithm represents just

one path your system traveled. What if you could create many paths by jumbling

the order of the trades that your algorithm generated. These different paths could

represent alternate universes. Let’s say that your algorithm got lucky and had a

bunch of winning trades in a row. This streak might be the portion of the equity

curve that pulled the system out of mediocre status. If these trades didn’t exist or

hadn’t fallen in place like they did, then the equity curve might look quite a bit

different. A robust trading system should still produce robust performance metrics

even when the trades are jumbled, some eliminated and some duplicated. If the

majority of the alternate paths of an algorithm fail to produce good metrics, then

the algorithm should be considered suspect.

Creating alternate paths or parallel universes is a very simple process when you

have access to a random number generator and a computer. As you saw earlier in

this chapter an RNG is a very special tool. Imagine all of the trades generated by

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!