Saturday, November 24, 2012

GDX Trading Systems - 2


Following Thursday's post I managed to finish 3 more long strategies for trading the daily chart of Market Vector's Gold Miner ETF (GDX). These strategies use the Force Index (FI), Volume Zone Oscillator (VZO) and True Strength Index (TSI) indicators.

The results (below) were obtained using the Think or Swim platform and reflect the use of each individual strategy from the first day GDX traded in 2006 until today. 

These strategies have been optimized (read 'curve fitted') to the max. As you will see, the number of trades is modest, the overall win percentage (70%) is nothing to get terribly excited about, but the winners pack a heck of a punch. The average return per trade (including the losing trades, of course) is a juicy $275. This kind of return was worth an average gain of around 5% each and every time it was attempted.


GDX – Market Vectors Gold Miner ETF
Individual LONG Strategy Results (2007 – 2012)

Strategy
Trades
Win/Loss
Win/Loss %
Total Gain
Avg Gain per Trade
6
Force Index
12
8W / 4L
66.6%
$4,001
$333.33
7
VZO
19
14W /  5L
73.7%
$5,606
$295.05
8
TSI
26
18W /  8L
69.2%
$6,042
$232.35






Total
57
40W / 17L
Avg 70.17%
$15,649
Avg $274.54


Strategy Indicators Used

Strategy Name
6
Force Index
Uses the Force Index and True Strength Index
7
VZO
Uses the Volume Zone Oscillator
8
TSI
Uses the True Strength Index


GDX – Market Vectors Gold Miner ETF             
Cumulative LONG Strategy Results (2007 – 2012)
(Strategies 6-8)

Year
Trades
Win/Loss
Win/Loss %
Total Gain
Avg Gain per Trade
2012
11
6W / 5L
54.5%
$2,563
$284.77
2011
9
4W / 5L
44.4%
$1,398
$139.80
2010
7
6W / 1L
85.7%
$2,670
$106.42
2009
11
8W / 3L
72.7%
$2,153
$121.32
2008
10
9W / 1L
90.0%
$4,269
$460.80
2007
9
7W / 2L
77.7%
$2,596
$288.44






Total
57
40W / 17L
Avg 70.17%
$15,649
Avg $274.54








































My hunch is that once I code my GDX long strategies into TradeStation and start throwing grenades at them the results will slip, perhaps considerably. It is one thing to manipulate indicators and variables such that one gets the desired outcome and quite another when the defined rules confront new realities as time marches forward.

A simple example that comes to mind is the use of a target price. Suppose a strategy executes a BUY order under a specific set of conditions and is then set to SELL GDX if it reaches a target price $6.87 higher than the entry price. That worked great when using the past 6 years of data but suppose in the future the same set of BUY rules get one into a trade but the highest GDX reaches after entry is $6.86 before then turning back down. The trade that had every reason to make a killing may well become a painful dud when another SELL rule closes the trade at a much lower price. 

Fortunately, there are techniques to deal with this statistical/probability issue that I will be able to address once I code the strategies into TradeStation. 

As I understand this at the moment, I will run my strategy code against a significant portion of the 6 year GDX time frame (perhaps 2006 - 2011) and optimize those results. Then I will run that optimized code against the time frame of GDX that was not included (2012) in the first test run....and see what happens. The name they have for this is "Walk Forward Analysis".

If, by chance, the strategy flew through this 'unknown' data and did well that is encouraging. In any case, the strategy variables will be further adjusted using another significant time frame (perhaps 2008 - 2012), optimized, then run against the time frame ommitted in this second test (2006-2007). 

And on and on, and so on, etc. etc. (I guess I already mentioned how extremely time consuming this challenge to create profitable strategies can be).

Hopefully the results of the final strategy version (attained when I have have hit the limit of my patience) will generally work well whenever it is run against any time frame it has not previously seen. Wish me luck?

I share this information with you for a couple of reasons. First, I would like for the reader to be able to evaluate these strategies with an understanding of the process used in their creation. And second, I would like for the reader to understand if/when it turns out these strategies are not as profitable as they now appear, there is actually a decent reason to have more confidence in them than now, not less.

The 5 long strategies I presented in the previous post and the 3 long strategies in this post yielded a gross gain of $46,573 ($30,924 + $15,649). This was accomplished by running each strategy on the GDX daily time frame since the first day it began trading at $38.75 a share on May 23, 2006 using 100 shares for each entry and exit.

GDX closed this past week at $48.74 - showing a 25.78% 'buy and hold' gross gain for its entire history. This amounted to a gross gain of just $999 for 100 shares.

$46,573 vs. $999.

Incredible contrast. But not realistic whatsoever. 

But heck, what if we could make $30K vs. $1K, or $20K vs. $1K  or even $10K vs. $1K realistically? Wouldn't that be worth pursuing? 

I think so. 

And I'll keep you posted, OK?

John
tsiTrader@gmail.com



Thursday, November 22, 2012

GDX Trading Systems


At last I have completed enough research and back testing that I can now begin to share some findings regarding my self-appointed mission to create an automated trading system that is both reliable and very profitable. 

I'm on a journey and quite sure the path is without end, but that keeps it interesting, right?

The good news is that I am finding strategies that generally match my objectives. The bad news is that it takes eons of time to craft a polished finished product (strategy) and even then, the product could always be better.....somehow. There are always more 'what-if' questions left unanswered when designing trading strategies than any mortal will ever have time to figure out. 

But I guess the fact that one does not have to be correct all the time when trading the stock market to make money is a consolation. Actually, it's a BIG consolation, now that I think about it! One just needs the odds on their side and the descipline to execute a sound strategy to succeed.

Anyway, let's take a look at the findings I have to share for today.

The table below provides an overview of 5 trading strategies I created for trading the Market Vector Gold Miner ETF (GDX) using the daily time frame. The Think or Swim platform was used to design these strategies and provide a detailed back test of their performance since 2007. 

The buy/sell signals are determined at the end of the NYSE trading session for use at the open on the following trading day. 

The top portion of the table details the five trading strategies (Pivot, Gap, PercentB, Step and UlcerX) and their performance. Each trade used 100 shares. The total number of round trip trades was 319, of which an average of 80.56% were winners. The gross gain in total was $30,924 and the average gain per trade was $96.94.

The strategies vary in the number of trades they generated over the past 5 years (32 - 120), the winning percentage also varied considerably (56% - 97%) and the average gain per trade was remarkably wide ($61 - $192). 

But for what it's worth, I imagine a diversity of strategies - some highly profitable mixed with some highly dependable - isn't an altogether bad way to go.


GDX – Market Vectors Gold Miner ETF
Individual LONG Strategy Results (2007 – 2012)

Strategy
Trades
Win/Loss
Win/Loss %
Total Gain
Avg Gain per Trade
1
Pivot
120
100W / 20L
83.3%
$8,454
$70.70
2
Gap
88
  70W /  18L
79.5%
$5,341
$60.69
3
PercentB
33
  32W /  1L
97.0%
$5,070
$153.63
4
Step
46
  37W /  9L
80.4%
$6,891
$149.80
5
UlcerX
32
  18W /  14L
56.2%
$6,160
$192.50






Total
319
257W / 62L
Avg 80.56%
$30,924
Avg $96.94


Strategy Indicators Used

Strategy Name
1
Pivot
Uses a % band above/below the Pivot Point Moving Average
2
Gap
Uses gap lower in price and a moving average of price
3
PercentB
Uses Bollinger Band PercentB movement within a range
4
Step
Uses Average True Range and the True Strength Index
5
UlcerX
Uses Ulcer Index and the True Strength Index


GDX – Market Vectors Gold Miner ETF
Cumulative LONG Strategy Results (2007 – 2012)

Year
Trades
Win/Loss
Win/Loss %
Total Gain
Avg Gain per Trade
2012
35
30W / 5L
85.7%
$2,501
$71.45
2011
50
42W / 8L
84.0%
$4,961
$99.22
2010
42
36W / 6L
85.7%
$4,470
$106.42
2009
75
59W / 16L
78.7%
$9,099
$121.32
2008
72
54W / 18L
73.3%
$5,806
$80.64
2007
45
36W / 9L
80.0%
$4,087
$90.82






Total
319
257W / 62L
Avg 80.56%
$30,924
Avg $96.94


































The lower portion of the table provides an annual assessment of the 5 strategies assuming they had been traded simultaneously since 2007. The year with the lowest Win/Loss ratio was 2008 (73.3%), the year with the highest total gain and average gain per trade was 2009 ($9,099 and $121). Also, the trades generated by the 5 strategies in both 2012 and 2010 were 85.7% winners.

So, if it sounds too good to be true, it cannot be true?

Good question. And, you are correct - it is not true..... at least, somewhat.

The three 'gotcha's' I can think of are these:

1. No one can trade GDX for free. There were 319 round trip trades which is actually 638 individual buy/sell orders. If one payed, say, $7 commission per trade, that would take $4,466 (638 X $7) off the gross gain of $30,924. 

2. Approximately 30% of the time there are 2 and even 3 strategies active. That is, sometimes the strategy signals overlapped. So, it would be entirely misleading and incorrect to suggest the cumulative sum gross gain ($30,924) was accomplished by always trading 100 shares. In fact, about one third of the time a person would have had 200 and sometimes even 300 shares in the market.

3. While the computer does tell me the trade the night before, the price it uses for calculation purposes is the opening price the following morning. If my order the following morning did not attain the opening price, that could change things some, but probably not too much.


Going forward, I plan to code these strategies into TradeStation and give them a more rigorous machine waching. If any/all of the strategies are still standing after that I will make their signals available on the website. 

I would like to apply these and many other strategies I have created to numerous ticker symbols and ultimately make their signals and their detailed statistical evidence available to everyone interested. 

I'm on a journey. Want to join me?

John
tsiTrader@gmail.com