Wednesday, December 15, 2010

Quantifiable Edges is Good Stuff

For anyone who has not seen this blog, please check out Quantifiable Edges. Rob Hanna is very knowledgeable and he basically is the inspiration for most of what I do here. I give him credit for his nifty tables (a format I have essentially copied. It's that good!) and creative market studies.  He has been doing this much longer than me and I would defer to him on just about anything market related. He wrote a post on 12-15-10 titled A Rare SPY Pattern That Has Always Been Followed by Short Term Gains. When the SPY hit a rare pattern, like it did on 12-14-10, it had been successful nearly 100% of the time, when looking 1 to 5 days out. [Today the SPY was down -0.46%. 6 straight up days were probably the contributing factor.]

All I wanted to do here is test my coding skills. I am not trying to refute his study, just practice my Amibroker coding skills. That's all.


SPY gap up, makes higher high, closes below open but still positive on day, buy on close. Sell N days later. $100,000 trade; 1993 to present
Exit n
 days
Net Profit
# Trades
# of winners
% of Winners
Max. Trade % DD
Avg % P/L
W. Avg. Profit
L. Avg. Loss
Profit Factor
Payoff Ratio
5
   19,878.53
11
11
100.00
-1.69
1.81
   1,807.14
   N/A 
 N/A
 N/A
4
   16,992.44
12
11
91.67
-1.69
1.42
   1,609.27
   (709.54)
24.95
2.27
3
   14,592.00
12
9
75.00
-0.99
1.22
   1,660.77
   (118.32)
42.11
14.04
2
   12,102.29
12
10
83.33
-0.97
1.01
   1,375.66
   (827.13)
8.32
1.66
1
     7,744.21
12
11
91.67
-0.74
0.65
       771.72
   (744.66)
11.40
1.04


It is nearly identical to Rob's. It is most like due to different data sources and backtesting engines. I use Norgate data and Amibroker. I think he uses Tradstation for everything. The results are close enough for me.

I'm glad I was able to re-create what he did. Just a little successful practice exercise. Thanks Rob.

4 comments:

Rob Hanna said...

Hi Chris,

Thanks for the kind words. I only just found your blog in the last couple of weeks. It appears you are already putting together a nice collection of studies here.

Good trading,
Rob

Chris said...

Rob - you're the man. Guys like you make me believe that my dreams can become a reality. I'm glad I can learn from you.

Anonymous said...

Notice the drawdown and profit are about equal. That is a 1:1 risk/reward ratio, that means there is no edge.

Chris said...

Drawdown is intra-trade. Profit is actual closed profit. You win 90% of the time. There's an edge. But I'm OK with you thinking there is not an edge.

Post a Comment