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

    • TDUP ThredUp stock, watch for a top of range breakout above 2.94 at https://stockconsultant.com/?TDUP
    • TDUP ThredUp stock, watch for a top of range breakout above 2.94 at https://stockconsultant.com/?TDUP
    • NFLX Netflix stock watch, local support and resistance areas at 838.12 and 880.5 at https://stockconsultant.com/?NFLX
    • Date: 8th April 2025.   Markets Rebound Cautiously as US-China Tariff Tensions Deepen     Global markets staged a tentative recovery on Tuesday following a wave of volatility sparked by escalating trade tensions between the United States and China. The Asia-Pacific region showed signs of stability after a chaotic start to the week—though some pockets remained under pressure. Taiwan’s Taiex dropped 4.4%, dragged lower by losses in tech heavyweight TSMC. The world’s largest chipmaker fell another 4% on Tuesday and has now slumped 13.5% since April 2, when US President Donald Trump first unveiled what he called ‘Liberation Day’ tariffs.   However, broader sentiment across the region turned more positive, with several markets rebounding sharply after Monday’s dramatic sell-offs. Japan’s Nikkei 225 surged over 6% in early trading, rebounding from an 18-month low. South Korea’s Kospi rose marginally, and Australia’s ASX 200 gained 1.9%, driven by strength in mining stocks. Hong Kong’s Hang Seng rose 1.6%, though still far from recovering from Monday’s 13.2% crash—its worst day since the 1997 Asian financial crisis. China’s Shanghai Composite added 0.9%.   In Europe, DAX and FTSE 100 are up more than 1% in opening trade. EU Commission President von der Leyen repeated yesterday that the EU had offered reciprocal zero tariffs on manufactured goods previously and continues to stand by that offer. Others are also trying again to talk to Trump to get some sort of agreement that limits the impact.   Much of the rally appeared to be driven by dip-buying, as well as hopes that the intensifying trade war could still be defused through negotiations.   China Strikes Back: ‘We Will Fight to the End’   Tensions reached a boiling point after Trump threatened to impose an additional 50% tariff on all Chinese imports unless Beijing rolled back its retaliatory measures by April 8. ‘If China does not withdraw its 34% increase above their already long-term trading abuses by tomorrow... the United States will impose additional tariffs on China of 50%,’ Trump declared on social media.   If implemented, the new tariffs would bring total US duties on Chinese goods to a staggering 124%, factoring in the existing 20%, the 34% recently announced, and the proposed 50%.   In response, China’s Ministry of Commerce issued a stern warning, stating: ‘The US threat to escalate tariffs is a mistake on top of a mistake... If the US insists on its own way, China will fight to the end.’ The ministry also called for equal and respectful dialogue, though signs of compromise on either side remain scarce.   Beijing acted quickly to contain a market fallout. State funds intervened to support equities, and the People’s Bank of China set the yuan fixing at its weakest level since September 2023 to boost export competitiveness. Additionally, five-year interest rate swaps in China fell to their lowest levels since 2020, indicating potential for further monetary easing.   Trump Talks Tough on EU Too   Trump’s hardline approach extended beyond China. Speaking at a press conference, he rejected the European Union’s offer to eliminate tariffs on cars and industrial goods, accusing the bloc of ‘being very bad to us.’ He insisted that Europe would need to source its energy from the US, claiming the US could ‘knock off $350 billion in one week.’   The EU, meanwhile, backed away from a proposed 50% retaliatory tariff on American whiskey, opting instead for 25% duties on selected US goods in response to Trump’s steel and aluminium tariffs.     Volatile Wall Street Adds to the Drama   Wall Street experienced wild swings on Monday as investors processed the rapidly evolving trade conflict. The S&P 500 briefly fell 4.7% before rebounding 3.4%, nearly erasing its losses in what could have been its biggest one-day jump in years—if it had held. The Dow Jones Industrial Average sank by as much as 1,700 points early in the day but later climbed nearly 900 points before closing 349 points lower, down 0.9%. The Nasdaq ended up 0.1%.   The brief rally was fueled by a false rumour that Trump was considering a 90-day pause on tariffs—rumours that the White House quickly labelled ‘fake news.’ The market's sharp reaction underscored how desperate investors are for any sign that tensions might ease.   Oil Markets in Focus: Goldman Sachs Revises Forecasts   Crude prices also reflected the uncertainty, with US crude briefly dipping below $60 per barrel for the first time since 2021. As of early Tuesday, Brent crude was trading at $64.72, while WTI hovered around $61.26.   Goldman Sachs, in a note dated April 7, lowered its average price forecasts for Brent and WTI through 2025 and 2026, citing mounting recession risks and the potential for higher-than-expected supply from OPEC+.       Under a base-case scenario where the US avoids a recession and tariffs are reduced significantly before the April 9 implementation date, Goldman sees Brent at $62 per barrel and WTI at $58 by December 2025. These figures fall further to $55 and $51, respectively, by the end of 2026. This outlook also assumes moderate output increases from eight OPEC+ countries, with incremental boosts of 130,000–140,000 barrels per day in June and July.   However, should the US slip into a typical recession and OPEC production aligns with the bank’s baseline assumptions, Brent could retreat to $58 by the end of this year and to $50 by December 2026.   In a more bearish scenario involving a global GDP slowdown and no change to OPEC+ output levels, Brent prices might fall to $54 by year-end and $45 by late 2026. The most extreme projection—based on a simultaneous economic downturn and a full reversal of OPEC+ production cuts—would see Brent plunge to below $40 per barrel by the end of 2026.   Goldman noted that oil prices could outperform forecasts significantly if there was a dramatic shift in tariff policy and a surprise in global demand recovery.   Cautious Optimism, But Warnings Persist   With both Washington and Beijing showing no signs of backing down, markets are likely to remain volatile in the days ahead. Investors now turn their attention to upcoming trade meetings and policy decisions, hoping for clarity in what has become one of the most unpredictable trading environments in recent years.   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 Leveraged 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.
    • CVNA Carvana stock watch, rebound to 166.56 support area at https://stockconsultant.com/?CVNA
×
×
  • Create New...

Important Information

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