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

Random Entry Generator for Systems Testing



PureBytes Links

Trading Reference Links

Here's just a suggestion for writing systems.  Many successful systems
writers suggest that you build a system in parts.  Find a high probability
entry and work on exits independently before you combine the two and study
the results.

Here's one way to generate a random entry system that you can use to test
your exits in a market or to compare with your entries to see if they are
truly better than random.

I'm using an uncorrelated value to base my entries on:  the volume.  Not the
relative change in volume or it's value in an absolute sense, but rather as
a test to see if it's divisible by a number, actually a prime number.  Based
on the data available in Metastock (OHLCV) this seems to be the most
independent that I could find (without the use of a random number generator
which would have to be built in a .dll).

For example,

ENTER LONG
Mod(Volume,23)=0
{will open a long position if the volume is an even number
Please note, if you have large volumes (x100) then you'll need to substitute
Volume/10000 or some other appropriate denominator to get rid of the zeros}

EXIT LONG
{Enter your exit for testing}

ENTER SHORT
Mod(Volume,31)=1
{Same note as above}

EXIT SHORT
{Enter your exit for testing}

For those with MetaStock Pro, you can put Optimization parameters in the
stops dialogue to see the systems behaviour across a range of parameters.
For EOD, you can change the stops manually to see the results.

Please note:  choose the prime number depending on the "normal" length of
trade that you are interested in studying.  Because the system tester will
close your LONG and enter SHORT when the short condition is hit, your random
entries might be experiencing more random exits than you think.  To test
this out on your data, just create a function like
CUM(Mod(Volume,31))/Cum(1) where a lower number like 0.2 or 0.3 gives you
lots of room between entries on average.

Dave Nadeau
Fort Collins, CO


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com