Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Dogpile

A Mechanical Strategy Journal

Recommended Posts

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)

 

Not sure how long I will stick with this journal but thought I would start the thread anyway. For Tradestation users, here is the code (copied exactly from the book):

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

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

hc=highest(h,9)-c;

lc=c-lowest(l,9);

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;

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

The reason I chose this one was because of its robust results and interesting methodology. In this system, you are exposed to the market 95%+ of the time (sometimes long, sometimes short) and the vast majority of the time you simply reverse your position at the same price when the rules trigger it.

 

The concept is simply that of buying/shorting a reversal using the last 9-day range. If you are low in the 9-day range, you will have a buy-stop order to go long. If you are high in the 9-day range, you will have a sell-stop order to go short. The order-entry system needs to know the opening price in order to calculate the next entry.

 

Here is an example,

you are trading low in the 9-day range and therefore looking for a buy signal. This signal occurs when price moves away from the next days opening price to the upside. In the strategy, you first calulate yesterdays close minus the lowest low of the last 9 days. You buy if price trades above the opening price in an amount sufficient to trigger a 'reversal' -- which is calculated as 66% of the distance from yesterdays close to the 9-day low.

 

Attached are some Tradestation screen shots of the Russell 2000 Futures using this strategy (using a single contract). The idea here is to ultimately see how I can use something like this in my own trading. Mechanical strategies have a tendency to do really well and then "drawdown" badly (ie, blow-up). This one has beaten the market without big drawdowns. Let's see how it does going forward.

5aa70e01e7cac_ResultsThru9-15-07.png.4f230b4d1fb45f3c872c297bb444794a.png

5aa70e023bda7_EquityCurveThru9-15-07.png.f5a10cdc63b8989f2ed898066622c7d0.png

5aa70e0242d27_TradesChartasof9-14-07.thumb.png.0b669d5b59c3e8297c2f2195668262d7.png

Share this post


Link to post
Share on other sites

Decided I am going to use the S&P's for this. Fits better with my focus on that contract in general... Also, I like the 5-day mechanical system... (this is a learning exercise -- reminder, I am not a mechanical trader -- I may even skip signals if Market Profile context or something else strongly favors it).

 

The 'system' is currently long... will start on next short-signal.

 

Today will have an entry (short) at 1485.50 on a sell-stop.

 

This calculation is computed as

 

(Opening Price - X)

 

where X = 0.66*(5-day high - Yesterdays Closing Price)

 

So, 1492.00 - .66*(1507.75 - 1498.) =

 

1492.00 - 6.44 = 1485.56

 

Short 1 ES Contract on Sell Stop (good until 4:15): 1485.50

Share this post


Link to post
Share on other sites

esz07

 

I am not actually trading this yet... actually got short at a better level than this strategy... but the strategy gives me some addedconfidence given its excellent results....

Share this post


Link to post
Share on other sites

Oh...I thought your last part of the post that said "Short 1 ES Contract on Sell Stop (good until 4:15): 1485.50" meant you did get short there. I was confused because price hadn't hit that yet. So far...that's the low of the day RTH.

Share this post


Link to post
Share on other sites

Dogpile,

 

It's a good project. The system is simple and has no parameters, that's great. I think the problem is where you said "I may even skip signals if Market Profile context or something else strongly favors it".

 

So what exactly is your mission statement here? I think its great to add mechanical aspects to your trading.. its an objective signal staring at you in the face. Problem is the objective signal is no good if you pay no attention to it.

 

Maybe you could just use the strategy as a filter - so you would only take long trades (using market profile, or whatever) when the system is long. Then if you decide to go against the system you could track how well you are "beating the system".

I know Art Collins is pretty opinionated on over-riding systems, you probably read that in the book (is it a good read by the way?)

 

The problem with just tracking the system mechanically real time is that its really boring. The chart you put up has the system going sideways (commissions included?) for over a year. Most people would drop the system or over-ride it in that time.

 

I think that is the one of the main attractions to discretionary trading - the idea that you can outsmart the market with your own intelligence. I run a daytrading system on all of the minis that makes money. I basically babysit it and trade my clients money on an end of day basis (hence why I am here typing). So it makes money -that's the point. But its boring. Someday when I feel super financially secure I will start trading using discretion -for fun mostly.

 

I think you are embarking on a good project! By watching mechanical systems trade real time, you actually can learn quite a bit, especially when you juxtapose the results with your own bias and emotions.

 

ws

Share this post


Link to post
Share on other sites

waveslider, cool -- I hope you stick around to offer some ongoing commentary.

 

<<The chart you put up has the system going sideways (commissions included?) for over a year. Most people would drop the system or over-ride it in that time.>>

 

a good system is probably cyclical. it might be a 'go-with' after it draws down for a while -- especially following the significant run it had earlier

 

<<I think the problem is where you said "I may even skip signals if Market Profile context or something else strongly favors it". >>

 

This is why I stated that I am not a mechnical trader.

 

Let me elaborate. I believe in discretionary trading whole-heartedly. I am a 'pattern-guy' --- but I do like statistics.

 

Obviously, I could build 5 filters into Arts code and try to have various switches and end up with a super complex system which I wouldn't have to override much... But that wouldn't be consistent with what I believe in.

 

If I see something like a downside 'breakaway gap' -- I am not going to go long the next day because the system advises such -- its only doing so because you are 'low in the 9-day range.' The idea here is to just think hard about what the system is saying and whether given the 'structure' of the market, it is a 'go-with' or not.

 

In my opinion, the market is just too complex for someone like me to build some supersystem. That said, I do think their are exploitable statistical biases. So I am doing this experiment. I am keeping the system super simple and using right-brain thinking in conjunction with it. I freely admit this goes against what Art advises. I just don't agree with Art that being 100% mechanical is the best way to go.

 

Art suffers very, very significant drawdowns -- but his returns are excellent. I wouldn't mind increasing my drawdowns a bit for incremental returns. This is why I am doing this...

 

attached is todays 'system entry'.. I actually covered my own short for a 3.5 pt profit just above where this system went short --- so goes to show how I am using this so far... :)

5aa70e02a22df_StratSignal9-17-07.thumb.png.77894b8418b0614017c334c6e2bf98f8.png

Share this post


Link to post
Share on other sites

the thing that is most interesting about this strategy is that of the 'concept' behind it. it is basically using a simple strategy of 'momentum off opening price' as its core principle. traders should try understand the power behind this concept. sometimes, this trigger will just be a 'bad price' as the momentum won't carry and you will be whipsawed big-time.

 

I actually was in a chat room with Art Collins earlier this year and I saw him act in real-time for a few months (the chat room no longer is in existence due to lack of subscribers -- not failure of his system). I watched him absolutely crush the market sometimes --- and then I watched him get absolutlely nailed with horrible entries and big-time drawdowns. He would agree that 'systems trading is not pretty to watch' --- but good systems do work.

 

The system I picked here seems to be best aligned with what he was doing -- using 'momentum off opening price'... you will catch all those trend days with this system -- and you will get nailed in those whipsaw days -- that is the volatility of this system.

Share this post


Link to post
Share on other sites

I realize now that Tradestation continuous contract information is faulty. I will re-start this thread as the calculations are off. this is already a useful journal as I would have had a faulty entry today if I had taken it. I have never traded mechanically before so this is all new to me.

 

nevertheless, trade information for the last completed contract (ESU07 -- the Sep futures) shows results very much in line with what I posted in this thread -- therefore the concept embedded in the strategy appears to be valid. Art Collins wrote the book in 2005 and the Sep 2007 futures show very nice results.

 

I will do a new journal with the December futures contract.

 

---------

This thread has officially been ended.

Share this post


Link to post
Share on other sites

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),aa(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.

5aa70e02cefc3_ESU07.Dstratresults.png.09d672d82302cddf1e2928c5ea17da01.png

5aa70e02d41cf_ESU07.dEquityCurve.png.b65b268a3d3aa39070f68e98613b70b6.png

5aa70e02da254_ESU07.dStrategyGraph.thumb.png.f35e6b43431cdf123a37f08c50ddba1d.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

5aa70e02dfc64_RUSOrder1091707.thumb.png.adfe2d7e79fae1fad1b22a606411a1e0.png

5aa70e02eb8da_NQOrder1091707.thumb.png.7b6897511b34ad459a5910ea7c166cb8.png

Share this post


Link to post
Share on other sites

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),aa(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

5aa70e02f18ba_RUSStratResultsSep2007ContractER2U07.d.thumb.png.25fbf87c8c2f09508940117b3db38909.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

<<"I realize now that Tradestation continuous contract information is faulty." ?>>

 

If you run the same strategy on ES.D and ESZ07.D -- I get different entry prices. That is a problem. I think the solution is just to look at individual contracts and then link them geometrically.

 

I had heard recently that Tradestations continuous contract was no good -- now I have my own discovery to go with that so I am placing zero trust in it.

 

This only really pertains to strategies that use historical days for their inputs at contract crossover points (as far as I know).

Share this post


Link to post
Share on other sites

Keep in mind that TS continuous contract is "back adjusted" or spliced to the old contract. However, it should match to a tick the current contract. If you discovered any discrepancy, that is because of the rollover and local cache issue. Sometimes it is corrected on the next login, and sometimes you have to force it. The easiest is to load @Es.d in the chart and then press "CTRL - R" . It should reload the new copy of the data, which should match current contract.

Based on your posts, your continuous contract did NOT roll over and it is (still) matching the September contract prices.

 

For backtesting results, it is ok to use continuous contract. Most of the people complain that old contract, which is spliced into continuous contract is actually shifted in prices, so there is no gap between current and expired contract at rollover time.

Share this post


Link to post
Share on other sites

thx.

 

so if I were to run my strategy for each individual contract and sum the results, you are saying that would equal the ES.D for the same period without much error?

 

I was thinking of test-running this on a few contracts and seeing what the results were.

 

Part of writing this thread is to work out the kinks in executing a mechanical strategy and these technical execution issues of how to handle rollovers are part of this.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Topics

  • Posts

    • ADMA Adma Biologics stock, watch for a range breakout, target 26 area at https://stockconsultant.com/?ADMA
    • URI United Rentals stock, nice rally off 829 support area, watch for top of range breakout at https://stockconsultant.com/?URI
    • Date: 27th November 2024. S&P500 at its 52nd new peak for 2024; USD Firmer, Kiwi & Yen Up. Asia & European Sessions: Wall Street rallied into the close with the S&P500 and Dow registering more record highs with the S&P500 climbing 0.57% to 6045, its 52nd new peak for 2024. The Dow rose 0.28% to 44,860.3 for its 46th record of the year. The NASDAQ advanced 0.63%. Trump named Jamieson Greer as the US Trade Representative and Kevin Hassett to direct the National Economic Council. Greer was intimately involved in Trump’s first-term trade policy decisions. President Biden announced Israel and Hezbollah have reached a cease fire. Over the next 60 days the Lebanese army and state security will take control of their own territory and Israel will gradually withdraw its forces. FOMC minutes: Minutes from the Fed’s latest policy meeting revealed officials leaning toward a cautious approach to future rate cuts. All agreed to cut the rate by -25 bps and nearly all thought risks between achieving employment and inflation goals were “roughly in balance.” Upside risks to the inflation outlook were little changed, and while inflation had eased, it remained elevated. The implied December rate continues to hover around a 50-50 bet as we await the PCE price data Wednesday and the crucial jobs report on December 6. The January 2025 rate is priced for a total of 20 bps in cuts, with -75 bps by January 2026. RBNZ cut its cash rate by 50 bps, yet the Kiwi gained as traders analyzed the central bank’s rate outlook and the governor’s remarks. Chinese government approved a 500 billion yuan ($69 billion) bond quota, enabling two state-owned asset managers to issue bonds for funding projects aimed at spurring economic growth. Today: US inflation and economic growth may provide clues to the Federal Reserve’s next policy move. Financial Markets Performance: The USDIndex has dropped to currently 106.459. The Yen climbed with USDJPY pulling back to 151.82, while NZDUSD jumped to 0.5900 despite the RBNZ’s 50 bps rate cut. Oil prices stabilized at $68.84, with optimism over delayed OPEC+ output increases balancing the reduced geopolitical risk stemming from the ceasefire. Gold rebounds to 2653.54, with next Resistance at 2660-2664. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Andria Pichidi HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • RBLX Roblox stock, pull back to 49.2 gap support area at https://stockconsultant.com/?RBLX
    • UHS Universal Health Services stock, nice rally off the 197 support area, from Stocks to Watch at https://stockconsultant.com/?UHS
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.