Go Back   Traders Laboratory > Trading Laboratory > Technical Analysis

Technical Analysis The technical discussion forum for traders. Moderated by mister ed.

Reply
Bookmarks
del.icio.us StumbleUpon Google Digg Facebook Furl Reddit Netscape

 
LinkBack (1) Thread Tools Search this Thread Display Modes Language
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-17-2007, 05:17 PM
Dogpile Dogpile is offline
Registered Trader

 
Join Date: May 2007
Posts: 577
Thanks: 0
Thanked 5 Times in 3 Posts
A Mechanical Strategy Journal

Thought it might be fun to track a mechanical strategy that looks highly interesting and do it as a journal here. I am not a mechanical trader -- but I definitely think there are some interesting aspects to mechnical trading.

This strategy is one from Art Collins book: "Beating the Financials Futures Market"

The strategy that I really want to investigate is from Chapter 41 and called 'The Continuous 66 Percent Momentum System'
(coded in the appendix as 41.3)

The book uses a 9-day range for its triggers. I prefer a 5-day range. Here is the Tradestation code for it (to be run on a daily chart):
--------
vars: mp(0),hc(0),lc(0),xx(0),a a(0);
hc=highest(h,5)-c;
lc=c-lowest(l,5);
if hc>lc then xx=hc;
if hc<lc then xx=lc;

mp=marketposition;
if mp<1 and hc>lc then buy next bar at o of tomorrow+(0.66*lc) stop;
if mp=1 and barssinceentry>0 then sell next bar at entryprice-(1.32*xx) stop;
if mp>-1 and lc>hc then sell short next bar at o of tomorrow-(0.66*hc) stop;
if mp=-1 and barssinceentry > 0 then buy to cover next bar at entryprice+(1.32*xx) stop;
---------------

essentially, the strategy is fading the daily trend while using some momentum off the opening price to potentially capture a new short-term daily trend.

We just began the December futures contracts so I will try to do this for the life of that contract. I will explain the entries as they come.

Attached are the results for the Sep 2007 completed S&P contract. The strategy triggered 29 trades during the life of the September contract (1 was left outstanding at the end and isn't included). It produced a record of 20-9 for 69% win/loss%. Long trades produced +$2,400 in profit per contract, Short trades were +$425 profitable. Tradestation calculates a 14.125% return on account (not annualized) using a $20,000 starting balance. No costs have been attributed for trading costs and no interest has accrued on cash balances. $20 per trade in costs would amount to a -$580 cost against this result.

Note that Art Collins wrote this strategy in 2005 and it is still working today. I think there is something interesting about this style of using momentum off opening price as a trigger to capture short-term momentum while fading multi-day trends.
Attached Images
File Type: png ESU07.D strat results.png (15.7 KB, 30 views)
File Type: png ESU07.d Equity Curve.png (11.8 KB, 19 views)
File Type: png ESU07.d Strategy Graph.png (18.2 KB, 36 views)


Last edited by Dogpile; 09-17-2007 at 05:23 PM.
Reply With Quote
  #2 (permalink)  
Old 09-17-2007, 05:35 PM
Dogpile Dogpile is offline
Registered Trader

 
Join Date: May 2007
Posts: 577
Thanks: 0
Thanked 5 Times in 3 Posts
Re: A Mechanical Strategy Journal

First Strategy order executed today:

Short 1487.75

Calculation for a Short is (as described in original post code):

Opening price - 0.66*(5Day High - Yesterdays Closing Price)

1492 - 0.66*(1504.25 - 1498.00) =

1492.00 - 4.13 = 1487.88

Trigger was 1487.75...

Holding a short from this level until either a buy-stop triggers or the coded stop-loss hits.

Reply With Quote
  #3 (permalink)  
Old 09-17-2007, 05:43 PM
TinGull's Avatar
TinGull TinGull is offline
Moderator

Trader Specs
 
Join Date: Oct 2006
Location: Stockton Springs, Maine
Posts: 1,469
Thanks: 0
Thanked 13 Times in 7 Posts
Send a message via AIM to TinGull
Re: A Mechanical Strategy Journal

So as of right now, you're in the red on this trade, right? Just trying to follow along. Did you backtest this on the YM or NQ?

Would be interested to know how that went.

Thanks!

Reply With Quote
  #4 (permalink)  
Old 09-17-2007, 05:50 PM
Dogpile Dogpile is offline
Registered Trader

 
Join Date: May 2007
Posts: 577
Thanks: 0
Thanked 5 Times in 3 Posts
Re: A Mechanical Strategy Journal

I am not an expert in the nuances of Tradestation back-testing... apparently it is not as easy as sticking in ES.D and observing the results.

But that said, Art Collins is an expert back-tester and he back-tests this strategy in his book. It is very nicely profitable in S&P's, Russell and Nasdaq -- he didn't test YM. (note that art uses 9-days in his back-testing).

This is partly why I posted the Tradestation code, to be transparent and let others back-test it as well if they want -- and maybe we all learn something while doing this.

Right now, I am just pulling the 'life of contract' for each contract of 2007 and 2006 and checking them out. The strategy has its flaws and nuances but it still beats the market. It is good example, in my opinion, of the power of 'range expansion off opening price'...

historical contracts:

esu07
esm07
esh07

esz06
esm06
esh06
esz05

etc...

so far looks consistent with the book results since art wrote it.

and yes, the trade is underwater. might get squeezed hard tomorrow off the FOMC stuff... will be interesting to watch the pain of a mechanical system as it will be impossible to trigger a long tomorrow (per the strategy rules) and bail this trade out.

Reply With Quote
  #5 (permalink)  
Old 09-17-2007, 06:04 PM
Dogpile Dogpile is offline
Registered Trader

 
Join Date: May 2007
Posts: 577
Thanks: 0
Thanked 5 Times in 3 Posts
Re: A Mechanical Strategy Journal

btw, the other thing I remember now that you mention it is that Art kind of has an inherent hedge by trading ES, NQ & ER2. 1 contract might trigger a really bad entry and another a good entry -- and so he has some diversification. On those really nasty whipsaw days where price surges in one direction off the opening price --- only to reverse and go in a trend move the other direction --- you hopefully don't get filled across the board (though that can certainly happen).

here were todays RUS & NQ entries today which are both in the green as we head into tomorrow.
Attached Images
File Type: png RUS Order 1 091707.png (9.2 KB, 15 views)
File Type: png NQ Order 1 091707.png (10.5 KB, 17 views)

Reply With Quote
  #6 (permalink)  
Old 09-17-2007, 06:29 PM
Dogpile Dogpile is offline
Registered Trader

 
Join Date: May 2007
Posts: 577
Thanks: 0
Thanked 5 Times in 3 Posts
Re: A Mechanical Strategy Journal

ok, last post as I am getting obsessed with this...

added this to the code a 'condition' so that it will only calculate trades when there is at least 100k contracts of volume. this has nothing to do with the strategy and is not any kind of change to the underlying concept -- that is the exact same -- this condition only has to do with looking at past data to view results. This filter will ensure that the strategy results are only using 'current contract' data and not just back-filling orders that you wouldn't have taken.

so here is the new full code:

vars: mp(0),hc(0),lc(0),xx(0),a a(0);


hc=highest(h,5)-c;
lc=c-lowest(l,5);
if hc>lc then xx=hc;
if hc<lc then xx=lc;

condition1=volume>100000;

mp=marketposition;
if condition1 and mp<1 and hc>lc then buy next bar at o of tomorrow+(0.66*lc) stop;
if condition1 and mp=1 and barssinceentry>0 then sell ("Stop Loss") next bar at entryprice-(1.32*xx) stop;
if condition1 and mp>-1 and lc>hc then sell short next bar at o of tomorrow-(0.66*hc) stop;
if condition1 and mp=-1 and barssinceentry > 0 then buy to cover ("StopLoss") next bar at entryprice+(1.32*xx) stop;

-------------

note the excellent results of the completed September contract for Russell. a single contract generated a $12,420 profit over 19 trades. this equates to a 62% return on account over a 3-month period (not an annualized number) trading just a single contract on a $20k account.

this strategy was on fire on the russell contract.... despite taking a -$4k loss on a long trade initiated on 7/25... sick
Attached Images
File Type: png RUS Strat Results Sep 2007 Contract ER2U07.d.png (16.1 KB, 20 views)


Last edited by Dogpile; 09-17-2007 at 06:42 PM.
Reply With Quote
  #7 (permalink)  
Old 09-17-2007, 06:54 PM
TinGull's Avatar
TinGull TinGull is offline
Moderator

Trader Specs
 
Join Date: Oct 2006
Location: Stockton Springs, Maine
Posts: 1,469
Thanks: 0
Thanked 13 Times in 7 Posts
Send a message via AIM to TinGull
Re: A Mechanical Strategy Journal

Interesting. You'd be in the green with YM as well, as a short would have been triggered at 13521. I'll be interested to follow your progress.

Reply With Quote
  #8 (permalink)  
Old 09-17-2007, 07:05 PM
Dogpile Dogpile is offline
Registered Trader

 
Join Date: May 2007
Posts: 577
Thanks: 0
Thanked 5 Times in 3 Posts
Re: A Mechanical Strategy Journal

there is a problem with your code. the entry should be below the opening price. I get 13485 as an entry on YMZ07.d with an opening price of 13505 today.

looks like this strategy was awesome on YM for the Sep contract...

but looking back a year ago to the last 'Z' contract (Dec 2006)... YMZ06.d lost money in that slow, steady creeper-up market move we had....

here was the life of contract results for last time we had a 'z' contract:
ER2Z06.d made +6,360
NQZ06.d made +7,840 (I use 2 NQ contracts vs 1 for others since NQ is so cheap)
YMZ06.d lost -655
ESZ06.d made +1,250

Reply With Quote
  #9 (permalink)  
Old 09-17-2007, 07:29 PM
nickm001 nickm001 is offline
Registered Trader

 
Join Date: Jan 2007
Posts: 74
Thanks: 0
Thanked 2 Times in 2 Posts
Re: A Mechanical Strategy Journal

Can you expand on the comment from the other "mechanical strat.." thread..
"I realize now that Tradestation continuous contract information is faulty." ?

Reply With Quote
  #10 (permalink)  
Old 09-17-2007, 10:20 PM
Reaver Reaver is offline
Rookie Trader

Trader Specs
 
Join Date: Nov 2006
Location: FL
Posts: 930
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Reaver Send a message via MSN to Reaver Send a message via Yahoo to Reaver
Re: A Mechanical Strategy Journal

Interesting thread. I look forward to seeing how it pans out.

Reply With Quote
Reply

LinkBacks (?)
LinkBack to this Thread: http://www.traderslaboratory.com/forums/f34/a-mechanical-strategy-journal-2488.html
Posted By For Type Date
Traders Laboratory - forumdisplay This thread Refback 09-17-2007 10:06 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Mechanical Strategy Journal Dogpile Technical Analysis 11 09-17-2007 04:59 PM
Dons trading journal GBP/USD Don4 Forex Laboratory 211 07-03-2007 02:26 PM
Discretionary vs Mechanical Trading Soultrader Technical Analysis 3 04-17-2007 10:23 AM
Mechanical System developers? MseTrap Data Feeds 6 01-24-2007 06:30 PM
Trading Journal Checklist MrPaul Market Analysis 4 12-01-2006 01:00 AM


All times are GMT -4. The time now is 10:44 AM.

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58