Mechanical system for trading the Dow

jpwone

Well-known member
Messages
254
Likes
3
The linked file is some work i did on a simple mechanical system. Unfortunately it uses OHLC data but really needs daily 5min data or similar to test properly.

Comments welcome.

It would seem to generate good returns for relatively small effort but as it stands I can't test for whips etc.

Be interesting to see what anyone else can make of it

JPWone

http://www.tradingspreads.com/mech/mech1.zip

it is an MS excel file which willl need unzipping
 
Hi JPWone

I'm confused, (well it is 10 0'clock in the morning). Is the idea to take the close price +0.3% and that price becomes the buy, and close price -0.3% to signal the sell?

If this is the case, then it's similar to something I've been working on, the only difference being the stop loss I would use is 60pts.

The main problem I think you will find is getting the price you want. Take yesterday as an example, the futures were down over 70pts, so you won't beable to get the price you wanted. The only way around that might be to put a limit order in the previous night, in which case your taking a 50/50 bet on which way the index will go the next day.

For the 5min data, try this http://charts-d.quote.com:443/10120...=0&Study=&Param1=&Param2=&Param3=&FontSize=10 This wil give you the data back to the 30/5/02.

HTH
 
Hi FB

thanks for taking the time to look at it.

Yes, the idea to take the close price +0.3% and that price becomes the buy, and close price -0.3% to signal the sell.

A couple of modifications which seems to work well but gives fewer trades with a far better chance of getting a reasonable price and minimise whips are:

a. Only trade it after 12.30 US ie . lunchtime

b. Use the previous close as the stop level, so the stop is approx 30 points.

JPWone
 
Hi JP

a. Only trade it after 12.30 US ie . lunchtime
That's where I've been going wrong :)

One more question, what happens if the price goes above +0.3% and reverses to the -0.3% mark. The first trade would be closed for -34, but would you short? I know it would take 2 trades in one day, but does the theroy still work?
 
Hi FB

yes that would now trigger the short entry.

The worst scenarios are where:-

it triggers a buy
gets stopped
it triggers a sell
gets stopped
it triggers a buy
gets stopped
etc

this was why i changed it to only trigger the trade after 12.30 as this reduced the likely frequency of this occurring and also avoided trying to chase prices in the US open.

The other option is to not close when you get whips but open the opposite trade in another account. You could also trade the cash and use the futures as the hedge in the same account. This ensures a loss of 60 points when you get whips but also means that multiple whips don't catch you out.

Like I say 'its a simple system' but it does need some more work on the rules and the optimising of entry points. It could be that you should always close a winning position at a certain point or that a .25% entry works better for the sell side. So, it needs some work but the bones of a tradable mechanical system are there I think.

JPWone
 
Hi - I've been running 'paper trades' for the last few week as follows:

Take Dow closing price 9.05pm (UK) then 'open stop orders'
a) buy @ close +30 pts
b) sell @ close - 30 pts

Close trade at following close & cancel any o/s stop orders not activated.

worst case is both are activated thus -60
next is one is activated but close is within 30 pts of prev close thus 0 to -60
best is one activated etc.

results - over a few weeks (v short time) = ave 40 pts / day over the period.

Haven't had time to explore other options
- don't use prev close but a later price (12.30 as suggested above) same day (s/b price @ 12.30)
- varying the +/- 30 pts
- entering after first 15 mins of trading (to avoid opening whipsaws

but - don't know how how close to the 'target' entry price the s/b firm will give (the price the order gets filled at).


As FsteBeater says above it seems to me that this is simply a 50/50 bet with a max -60 loss / day - I guess it all depends on how the Dow 'trends' each day vs whipsawing ...........
 
Following on this thread..... trading this way is going to involve problems , as does any mechanical system. You have to accept there are going to be draw downs and losses. The trick is to ensure via backtesting that your algorithm will capture a substantial percentage of all the major moves. Just by way of an example, look at the DJIA for 29/01/02. The major reversal ( and loss) may well have seduced you into thinking big down, having closed not too far off LOD. Surprise,surprise a reversal off the bottom. Hits like these you have to take and get on with it. Fortiunately, just prior to that there was a solid downtrend that should have netted 4-500 points. More than enough to compensate for the following hit..... Having backtested this thing, my comments so far are these:-
It looks ok , but like all mechanical things, one has to commit to it like a religion. You said in the chat room that it had returned 23,000 points in a year. The results seem to infer that the return is over the life of the backtest...some 28 months. Is that correct, or am I missing something? That equates to 820 points/month or 40 per day. This is still well above commonly quoted target requirements of "25 points a day" and therfore must have merit.
I guess at the end of the day it's down to the comfort factor. Can you handle taking a 60 point loss one day.... and missing out on a 200 point rally and dip, to see it close near the opening price? Greed will play a strong part in whether you stick rigidly to your mechanical plan. Fear may make you close an obvious losing position......
Below is an EDS that I worked on for quite a while, using just EOD data. This produced excellent results in backtesting/simulation especially when the stakes were compounded up. This worked along the following lines.....Take an initial stake of 1 unit per point. When your Capital had risen by 300%, then double your stake to 2 units and so on. Please don't ask me for details or workings as they got lost, regretably. The basis of this was to trade using the 7 day MA. Basic arbitration was done making a descision based on the closing price, relative to the 7MA and the Candle data. These are the four rules 1,2,3 and 4, along with the converse rules 1A-4A. The other parts were arbitration rules....complex, messy and "engineered to fit". But the final results looked good.This had "hits" of quite a few hundred points. Those that have AIQ EDS can copy and paste and try it. When I did my simulation, I had two separate EDS's. One for "Go Long" the other for "Go short" they were both "mirrors". Be warned, this EDS may have bugs in it and ultimately I got frustrated with the whole thing and gave up. May be it's time to take another look...
I'll post the EDS as a follow on to this as it's getting a bit long....
 
The EDS... those that don't have AIQ, cannot use RSI AIQ which is normal RSI , but using and exponentially smothed average. It's an "engineered to fit" arbitration so is not really important. CCI,TCI VEL, are aiq indicators and are also used in arbitration to deal with tricky situations and try and second guess continuation or reversal.This system is "always in the market" . This is not de-bugged...Have fun :)

short is 7.
MA is simpleavg([close],short,0). ! Define 7 day moving average.
lowup if val([low],1)<[low] . ! higher low yesterday?
risky1 if [high]>val([open],1)and [close]>val([low],1).
! Four possibilities of open and close wr.t. Moving average

Up if [st ma]>val([st ma],1). !MA is up trend from yesterday
Down if [st ma]<val([st ma],1). !MA is down trend from yesterday

Rule1 if [open]>ma and [close]>ma and up. !open candle
Rule2 if [open]<ma and [close]>ma and up. !open candle
Rule3 if [open]>ma and [close]<ma and up. !closed candle
Rule4 if [open]<ma and [close]<ma and (up or risky1). !closed candle

Rule1a if [open]>ma and [close]>ma and down. !open candle
Rule2a if [open]<ma and [close]>ma and down. !open candle
Rule3a if [open]>ma and [close]<ma and down. !closed candle
Rule4a if [open]<ma and [close]<ma and down. !closed candle

!******************************************

Rule5 if [rsi aiq] >val([rsi aiq],1). !RSA > yesterday .......Arbitration...
Rule5a if [rsi aiq]>val([rsi aiq],2). !RSA > 2 days ago
Rule6 if [rsi wilder]>val([rsi wilder],1). !RSW > yesterday
Rule6a if [rsi wilder]>val([rsi wilder],2). !RSW> 2 days ago


Rule5b if rule5 or rule5a.
Rule6b if rule6 or rule6a.
rule7 if rule5b or rule6b.
!*******************************************
tciup if Val([TCI],1)<[tci].
cciup if val([cci],1)<[cci].
velup if [velocity]> val([velocity],1).

Keep if cciup or tciup or velup.

BuyDow if (Rule1
OR Rule2 and (rule5 or rule6)
OR Rule3 and rule7
OR Rule4 and rule7)and lowup.

SellDow if Rule4a
OR Rule2a and not (rule5 or rule6)
OR Rule3 and not rule7
OR Rule4 and not rule7.

!out if [close]<[open].

!Phasedown if Val([phase],1) > [Phase].
!mcd if Val([macd osc],1)>[macd osc]*1.1.
!tci if Val([TCI],1)>[tci].
!cci if val([cci],1)>[cci].
!vel if val([velocity],1)>[velocity].
!sellDow if tci or cci or vel or out.
 
Hi CM

yep my mistake - an earlier version which was running too tight an open trigger generated 23000 points in the year. I had forgotten that I had modified it to better absorb the intraday moves and hopefully better reflect what was achievable. Still, 23000 points in 28 months ain't too bad.

Like your own system, its a while since I looked at it. I think with most systems like this you need a level of discipline and commitment to it which I am only prepared to make if I can test it properly. Once I realised that my testing coul not properly take into account the intraday whips and that unless I could find a way of getting into the market at a price which was at least close to my entry price then there did not seem to be a lot of point in pursuing it.

I do think, having said all that, that an entry after 12.30 EST could be the way to go. I may start a record of the half hour data so I can test this properly in the future.

JPWone
 
If you want 1 min DOW intraday data for the last 5 years then try http://www.traders2traders.com/linkindex/Goto.asp?ResourceID=195.

Your system is similar to Larry Williams classic volatility breakout system which is one of the most consistently profitable systems I monitor. I use it on S&P futures but the principle is the same. Basic buy at today's open + 40% of yesterday's range, sell at today's open - 40% of yesterday's range. Stop at 8 s&p pts (60 DOW points). Only one trade a day. Exit at market close if not stopped.

When you try your system on intraday data I think you will find it will whipsaws you quite a bit and will not get anywhere near 23,000pts. My Guess would be closer to 5,000 pts but still reasonable.
 
whips and liquidity issues is what kills most new retail traders - and unfortunatly you cant test liquidity on back testing - back testing is just another way of markets suckering you in to take your bucks, as are off the wall lagging indicators
 
Top