[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Question of Testing Order



PureBytes Links

Trading Reference Links

Hi Dave,
To answer your question, let's assume that we are looking at a day-trading 
system being tested--although the discussion will apply for any period of 
time. Most stock and commodity data does not indicate if the low or the high 
of the day was hit first. I've seen data in the past that would indicate this 
with a "(1)" behind the data for first hit and a "(2)" for last hit, but I 
haven't seen this in quite a while. On intraday testing many programmers 
assume that the direction of the previous day indicates which was hit first. 
In other words if the low for the day is below yesterday's close and the high 
is above the  close and the stock is up for the day; then it's assumed that 
the low was hit first. If the day's high is below the close of yesterday then 
it's assumed that the high was hit first IF the open is closer to the high 
than the low. If the open is closer to the low then it's assumed that the low 
was hit first. The reverse is true if the stock moved up the previous day. 
Extensive test by Larry Williams and other analyists have shown that this 
will correctly predict accurate results 84% of the time. The errrors are 
mostly centered around instances where the open and close are close together 
and the high and lows are equidistant apart.  Over a large stistical sample 
these errors will mostly cancel out.  In other words, the times you would 
have been stopped out on the low and the stock then moves up about equal the 
times you would have moved to the high and then the stock hit the low. 

Some services now give the time of day when the highs and lows are hit so 
that, if you pick this up daily (I'm not aware of any historical data now 
availavle that gives this) you can include this in your own analysis. 
Metastock is limited in this type of decision making so you either need to 
analyze on a case-by-case basis or use a more appropriate programming 
language. The case-by-case analysis, involves assuming the worse case in 
being stopped out and looking at the trading for that day and seeing if this 
was indeed the case and adjusting the results manually.

If your system buys in at the open and sells at the close then the 
consideration is if you got the close (+/- something) or were stopped out 
during the day. The fills at openings and closes are a major consideration if 
you are short-term trading because there are usually spreads in the opening 
and closing ranges that are not reported. These variances are larger in fast 
moving markets or low volume stocks. It is the reason why a lot of systems 
that work on paper, end up having worse performance in actual trading. Limit 
orders are a way some traders get around this, but just because a stock hits 
the limit price does not necessarily mean that your order was executed. This 
is true more for commodities than for stocks because of the lower volume.

This is probably more than you wanted to know with regard to your question 
but it is not all inclusive. System testing is as much an art as it is a 
science--as is trading in general. Hopefully this will give you enough to 
think about to evaluate your results from system testing and to understand 
some of the pit falls.

Good luck,
Joe Nemecek