Welcome to the Traders Laboratory Forums.
Technical Analysis The technical discussion forum for traders.

Reply
Old 09-17-2007, 05:17 PM   #1

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 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 Thumbnails
A Mechanical Strategy Journal-esu07.d-strat-results.png   A Mechanical Strategy Journal-esu07.d-equity-curve.png   A Mechanical Strategy Journal-esu07.d-strategy-graph.png  

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

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 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.
Dogpile is offline  
Reply With Quote
Old 09-17-2007, 05:43 PM   #3

TinGull's Avatar

Join Date: Oct 2006
Location: Stockton Springs, Maine
Posts: 1,440
Ignore this user

Thanks: 0
Thanked 53 Times in 19 Posts

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!
TinGull is offline  
Reply With Quote
Old 09-17-2007, 05:50 PM   #4

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 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.
Dogpile is offline  
Reply With Quote
Old 09-17-2007, 06:04 PM   #5

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 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 Thumbnails
A Mechanical Strategy Journal-rus-order-1-091707.png   A Mechanical Strategy Journal-nq-order-1-091707.png  
Dogpile is offline  
Reply With Quote
Old 09-17-2007, 06:29 PM   #6

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 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 Thumbnails
A Mechanical Strategy Journal-rus-strat-results-sep-2007-contract  

Last edited by Dogpile; 09-17-2007 at 06:42 PM.
Dogpile is offline  
Reply With Quote
Old 09-17-2007, 06:54 PM   #7

TinGull's Avatar

Join Date: Oct 2006
Location: Stockton Springs, Maine
Posts: 1,440
Ignore this user

Thanks: 0
Thanked 53 Times in 19 Posts

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.
TinGull is offline  
Reply With Quote
Old 09-17-2007, 07:05 PM   #8

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 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
Dogpile is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading Journal Checklist MrPaul Market Analysis 7 02-18-2011 04:41 PM
A Mechanical Strategy Journal Dogpile Technical Analysis 11 09-17-2007 04:59 PM
Dons trading journal GBP/USD Don4 Forex Trading 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 Brokers and Data Feeds 6 01-24-2007 06:30 PM

All times are GMT -4. The time now is 04:34 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.