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

RE: open price, back testing and the reality



PureBytes Links

Trading Reference Links

There are inherent problems with all forms of back testing since we get our buy 
or sell signal confirmed after the market is closed. When we download our data 
and run our tests.

Whether you use the open or the close the best way to avoid the above problem 
is to take the formula that you have for your sytem and then solve it for the 
open (or close). Then shift everything forward one time period. This will give 
you some number that tells weather your signal will be triggered the day of 
instead of that evening.

here is an example of a simple test.

We have this for our example:
Enter long when:

close > 3 day MA

Close long when:

3 day MA > close

But what we will do is to rearrange the formula like this:

3 day MA = (ct + ct-1 + ct-2)/3

Next for simplicity we will set 3day MA = close, where close will equal ct.
Then we substitute the above formula into this equation.

(ct + ct-1 + ct-2)/3 = ct

by doing simple algebra we have a new formula:

(ct-1 + ct-2)/2 = ct

But this is for the current period and we want some number for tomorrow. SO we 
shift everything forward one time period. The formula now becomes.

(ct + ct-1)/2 = ct+1

Now let us put (ct + ct-1)/2 into a cusom formula and call it
"3day MA shifted forward 1 day"

Now when you plot this custom formula you will get some number plotted on your 
screen.

So lets say it is Monday night and you have been following XYZ stock which is 
trading at 22. Lets say that your cutom indicator reads 22 1/2.

So now Tuesday rolls around and you watch XYZ and lets say it goes above 22 1/2 
for the day but doesn't close above 22 1/2. In fact lets say it closed at
22 3/8.

So you don't enter the market because your rule is enter long when the close > 
3 day MA.

And when you download the data and run your test you would see that you are out 
of the market. .e., no buy signal.

Now on Tuesday night you also have a new number from your custom formula for 
tomorrow. Lets say this new number is 22 7/16. SO now Wednessday if you feel it 
will close above 22 7/16 you can enter the market since it would triger your 
buy signal that night after the download.

So lets say on Wednessday it closed at 22 3/4. And lets say you bought at
22 5/8.

When you download and see that you did have a signal. Now lets say that your 
custom formula gives you 22 9/16. This will be your number for Thursday. You 
repeat this process every day until the close is no longer above the number of 
your custom formula. Then you will exit the market. Then you will see that 
night that you had a sell signal.

I know that this was a bit long and it is a very simple formula and not all 
formulas can be solved this way. But I hope that you get the idea of what I 
trying to get you to think about.

I have my own custom formulas that I have solved for in a similiar manner and 
it works very well. I call mine the Jarvis Factor. I have also coined any 
indicator that I can construct in the above manner as being a Jarvis Class 
Indicator.

I hope this helps.

Harley Meyer

On Wed, 9 Jul 1997 07:34:16 -0400,
waheeb wrote...
>
>
>I am back-testing a system in which all the trades will be executed next
>day at open price.
>Say xyz opened last Monday (historical data) at $15.75 and my question is=
>
>this valid to back-test.
>I always see bid & ask range regard less of the time (at open or at close=
>).
>Any comment on this.
> Also does anyone know how to forecast the next day opening price.
>
>Thanks
>
>waheeb
>
>

Harley Meyer
meyer093@xxxxxxxxxx