Thursday, March 15, 2012

Testing a Mechanical System by Sight: SPY Mechanical Renko System

One of the more popular mechanical trading systems out on the web today is the SPY Mechanical Renko System.  It is “mechanical” because all of the trades are entered automatically; there is no subjective decision making.  You either go long or go short based on what the system tells you to do.

Chart Settings

Symbol:  SPY

Chart Type:  Daily Renko, Box Size 0.5, Close

Click here for an overview of Renko charting.

Overlays:

1.  Parabolic SAR, (0.09, 0.2)

The Parabolic SAR is a fairly complex indicator and appears as a dot either above the price if the function determines that price is falling and below price if it is rising.  SAR stands for “Stop and Reverse” and ideally when price changes trend, the SAR indicator will reverse accordingly.  The first number is the Acceleration Factor or “Step” function which dictates how sensitive SAR is to price change.  The second number is the “Maximum Step”.

Click here for an overview of this indicator.

2.  EMA (5)

A 5 period exponential moving average.

Indicators:

1.  RSI (14)

2.  Full Stochastics (14,3,3)

3.  MACD (12,26,9)

4.  CCI (20)

Mechanical Trading System Rules

1.  100% in the market – you are always either long or short the market

2.  Long Entry (when all of the following are true): 

a.  Renko Box is white (an “up box”)
b.  Renko Box closes above the EMA(5)
c.  Parabolic SAR is below price
d.  Full Stochastics confirms long entry by crossing over 20 line

3.  Short Entry (when all of the following are true):

a.  Renko Box is red (a “down box”)
b.  Renko Box closes below the EMA(5)
c.  Parabolic SAR is above price
d.  Full Stochastics confirms short entry by crossing below 80 line

Here is a chart of the first couple of trades:

System Results

No.
Signal
Date
Price
Points Gain/(Loss)
% Gain/(Loss)
1
Long
12/1/2010
117.5
2
Short
2/22/2011
130
12.50
10.64%
3
Long
3/3/2011
130
0.00
0.00%
4
Short
3/7/2011
129
(1.00)
-0.77%
5
Long
3/21/2011
126
3.00
2.33%
6
Short
4/18/2011
128.5
2.50
1.98%
7
Long
4/202011
130.5
(2.00)
-1.56%
8
Short
5/5/2011
132
1.50
1.15%
9
Long
5/10/2011
133.5
(1.50)
-1.14%
10
Short
5/16/2011
131.5
(2.00)
-1.50%
11
Long
5/31/2011
132
(0.50)
-0.38%
12
Short
6/1/2011
130.5
(1.50)
-1.14%
13
Long
6/21/2011
126.5
4.00
3.07%
14
Short
6/24/2011
126
(0.50)
-0.40%
15
Long
6/28/2011
127
(1.00)
-0.79%
16
Short
7/11/2011
131.5
4.50
3.54%
17
Long
7/21/2011
131.5
0.00
0.00%
18
Short
7/27/2011
131
(0.50)
-0.38%
19
Long
8/9/2011
113
18.00
13.74%
20
Short
8/10/2011
114
1.00
0.88%
21
Long
8/11/2011
113.5
0.50
0.44%
22
Short
8/15/2011
117.5
4.00
3.52%
23
Long
8/23/2011
113.5
4.00
3.40%
24
Short
9/2/2011
119
5.50
4.85%
25
Long
9/7/2011
117.5
1.50
1.26%
26
Short
9/9/2011
117
(0.50)
-0.43%
27
Long
9/14/2011
116.5
0.50
0.43%
28
Short
9/21/2011
118
1.50
1.29%
29
Long
9/26/2011
114.5
3.50
2.97%
30
Short
9/29/2011
115
0.50
0.44%
31
Long
10/5/2011
111
4.00
3.48%
32
Short
10/17/2011
119.5
8.50
7.66%
33
Long
10/18/2011
121.5
(2.00)
-1.67%
34
Short
10/25/2011
122.5
1.00
0.82%
35
Long
10/27/2011
124.5
(2.00)
-1.63%
36
Short
10/31/2011
125.5
1.00
0.80%
37
Long
11/3/2011
123.5
2.00
1.59%
38
Short
11/9/2011
125
1.50
1.21%
39
Long
11/11/2011
124.5
0.50
0.40%
40
Short
11/16/2011
123.5
(1.00)
-0.80%
41
Long
11/28/2011
118
5.50
4.45%
42
Short
12/8/2011
123.5
5.50
4.66%
43
Long
12/20/2011
122.5
1.00
0.81%
44
Sell
3/6/2012
135.5
13.00
10.61%

From 12/1/2011 to 3/6/2012 the system took 44 trades.  Not as many as I would like to see but it is a start.  It is mainly meant to keep you in big trends and can have a tendency to create whipsaws often.  When I was “sight testing” the system I picked the high of the bar for our entry if we were long and the low of the bar for our entry if we were short.  This helped keep down any biases.  Of course the system doesn’t account for any commissions, slippage or human error, but it shows some promise.

Let’s take a look at some basic statistics:

No. of Trades
44
No. of Wins
28
No. of Losses
13
Even Trades
2
Winning %
63.64%
Avg Win
4.00
Avg Loss
-1.23
Profit Ratio
3.25
Largest Loss
-2
StDev
4.23

These were calculated from the table above.  I like the profit ratio and the winning % is solid.  The best part is the largest loss is only 2 points.  The standard deviation is a bit high (larger than the average win) so we can’t tell right now how robust the system is.  More samples would help.  Let’s plug this into the Trading Stats calculator and see what we get:

Trading Stats Calculator
Inputs
Outputs



$
%
Winning Percentage
63.64%
Expectancy Per Trade
209.84
209.84%
Average Win
400
Edge
-
1.40%
Average Loss
123
Fractional Gain (FG)
400
2.67%
Account Size
15,000
Fractional Loss (FL)
123
0.82%
Sample Size
48
Initial Risk Per Trade (Unit Size)
123
0.82%
Standard Dev (All Trades)
423
Win/Loss Ratio (Profit Ratio)
-
3.25
Largest Losing Trade
200
Capital Units Available
-
121.95
Minimum Win % Required to Be Profitable1
-
24.00%
Maximum Average Loss to Be Profitable3
700.11
4.67%
Minimum Avg Win to Be Profitable2
70.27
0.47%
Risk of Ruin
-
3.30%
Optimal Risk
t-Test
-
6.55
Leibfarth Formula
4.55%
Optimal F
-
0.524593
Kelly Formula
52.46%
Maximum Leverage
381.2479389
-

I assumed we were trading 100 shares of SPY at a time, giving an average win of $400 and an average loss of $123.  Our edge is sharp at 1.4% and our expectancy is 209.84 per trade – both solid numbers.  It is nice to see a maximum average loss of 700 – this means that we could set our stops wider, should we need to or if we were late on an entry it wouldn’t kill the system.  T-test was greater than 1.6 so we know the system result wasn’t just “by chance”.  Finally, the risk of ruin is only 3.3% giving us a nice cushion.

More on Renko mechanical systems to come.

For the basics of this system, check out Breakpoint Trades here.

4 comments:

  1. This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great.
    Dow Futures

    ReplyDelete
  2. So what was the RSI and CCI for?

    ReplyDelete
    Replies
    1. On a closer inspection you are not even following your own rules on the image, fucking worthless.

      Delete