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.

This trade, optimize, implement, and trade cycle is easy to see. Testing using this

process on a long stream of historical data would be very difficult if tools such as

the TS WFO were not available. A test would have to be started, stopped, results

recorded, backed up, and optimized on in-sample data, started, stopped, results

recorded, backed up, and optimized on in-sample data, started, stopped … .You

get the picture.

Before proceeding, please refer to the TradeStation WFO Help menu to learn

how to set up an optimization and then load that information into the software. The

TS WFO Help system will also show how to perform an individual walk-forward

analysis (WFA), or a cluster WFA.

Here is an individual WFA of a Turtle-like system selectively changing its

parameters every two years. The first results shown are with the benefit of hindsight.

The best parameters for each time period were utilized to construct the continuous

track record. All the reports shown were produced using the TS WFO. The system

labeled TA2 will enter and exit the market utilizing the following criteria:

//EasyLanguage Code for Turtle-like Algo

Buy Next Bar at Highest (H[1],xLongEntryLen) stop;

250

Sell Short Next Bar at Lowest (L[1],xShortEntryLen) stop;

GENETIC OPTIMIZATION, WALK FORWARD

If MarketPosition = 1 Then

Sell Next Bar at Lowest (L[1],xLongExitLen) stop;

If MarketPosition =-1 Then

BuyToCover Next Bar at Highest(H[1],xShortExitLen) stop;

In-Sample Testing You will notice four optimizable parameters:

1. xLongEntryLen

2. xLongExitLen

3. xShortEntryLen

4. xShortExitLen

Since the long entry parameter may not be the same as the short this system is not

symmetric. This also applies to the long and short exits. Different parameters for

long and short entries were used to increase the search space sufficiently to enable

a genetic optimization. You will notice if the exhaustive search space is less than

10,000, then the genetic method is disabled. Table 8.3 shows the in-sample testing

results of TA2 over the past 14 years on 30-year bonds.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!