Search
Archives

You are currently browsing the thestrategictrader.com blog archives for December, 2011.

Archive for December, 2011

Intro

This is the first strategy built entirely using patterns discovered from the tstPattern Searching software. The strategy is set to exit after being in the trade for 5 bars. Obviously, 5 bars is not an ideal exit. However, it provides a uniform baseline to build with room to improve in the future. The pattern consists almost entirely of RSI based inputs.

The in-sample testing period consists of 6/1/2001 – 1/1/2011 on 5 minute ES bars.

Pattern Inputs

AddParam(RSI(3,1)[0],”RSI3 “);
AddParam(RSI(7,1)[0],”RSI7 “);
AddParam(RSI(14,1)[0],”RSI14 “);
AddParam(RSI(21,1)[0],”RSI21 “);
AddParam(RSI(30,1)[0],”RSI30 “);
AddParam(RSI(45,1)[0],”RSI45 “);
AddParam(RSI(60,1)[0],”RSI60 “);
AddParam(ADX(3)[0],”ADX3 “);
AddParam(ADX(21)[0],”ADX21 “);
AddParam(ADX(45)[0],”ADX45 “);
AddParam(RSI(ATR(5),3,1)[0],”RSIATR5 “);
AddParam(RSI(ATR(14),3,1)[0],”RSIATR14 “);
AddParam(RSI(Volume,3,1)[0],”RSIVOLUME3 “);

Observations

When we ran the pattern searching software against our testing file a total of 220 patterns exceeding statistical significance were generated. Shown here is the top pattern discovered. Keep in mind, because this is only one pattern, the number of trades is a bit low. Because of this we also validate the pattern against the Dow Mini (YM). This allows us to feel more confident that the pattern is not simply curve fit to the ES data.

Strategy In-sample Results

Profit: $26,192
PF: 2.14
Trades: 650
Win %: 62.26
Expectancy: +$41.40 per contract

Strategy Out of Sample Results (1/1/2011 – 12/1/2011)

Profit:$5,062
PF: 2.19
Trades: 97
Win %: 67.01
Expectancy: +$52.19

Strategy On YM

Profit: +$22,770
PF: 1.70
Trades: 827
Win %: 59.61
Expectancy: +$27.53

Summary

This new method for generating strategies has a lot of promise, but a lot of work left to do. We have built the main pattern reading software into a DLL so that we can distribute it with the strategy. Although we have built this blog to share with the world our techniques, there still exists IP that we do not wish to share completely. Before you can use the pattern below, you must install the pattern reading software. Follow the instructions here: DLL Installation

Download Pattern Strategy
Download Pattern File

Share this article

What is this software?

Going forward we will be using custom pattern searching software for creating new strategies. The software searches through thousands of potential patterns and only saves the patterns that exceed statistical thresholds. The method for finding strategies is very similar to standard neural networks except with a few custom twists.

How is a pattern found?

We feed raw indicator values and the resulting output into a “training” file. The software then constructs neural networks that “learn” the profitable patterns. For example, we may wish to find a pattern that identifies a high likelihood of being profitable 5 bars into the future. For this training file we would write the delta between today’s bar and 5 bars into the future with the corresponding raw indicator values for each entry.

The software then traverses the training file and determines the best patterns for reaching the desired outcome.

Statistical Thresholds

When searching for patterns in an automated fashion, we have to be careful not to include a pattern just because of random luck. To filter out patterns that are the result of luck, we require the pattern to exceed values on win% and/or trade expectancy. At the start of each training cycle the software traverses the training file and determines the average win% and trade expectancy for various trading frequencies as well as the corresponding standard deviation.

Using this information the software identifies which thresholds need to be exceeded to be statistically significant.

Share this article

This post was suppose to be a follow up to part 1. However, while filtering down trades utilizing my pattern searching software I had an epiphany of sorts. Using various technical indicators directly is just a waste of time. Its true that some indicators have more value than others, but the process of searching for an edge the way I have been is too slow and clumsy. Instead, using pattern searching software I can determine which indicators work and identify tradeable patterns much quicker.

As part of this discovery, I found that the same patterns I was using to filter out losing trades could instead be used as entry conditions. In a matter of minutes I had created a strategy using only newly discovered patterns that drastically outperformed the simplistic strategy outlined in part 1.

Armed with this knowledge, I plan to take this blog in an entirely new direction. Instead of focusing on if indicator does x, then do y, I will feed raw indicator values into the pattern searching software and let it figure out the underlying relationships. Then use these patterns to build new strategies.

Share this article