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

RE: [EquisMetaStock Group] Equalizing System Starts



PureBytes Links

Trading Reference Links

Ooops - I don't think I was clear. I'm comparing results of two or more
different systems on the same set of data - i.e. two or more separate tests.
So the  test using  the 10 bar variable has no reference as such to the test
using the 200 bar variable. 

For example, test 1 might be based on c> mov(c,10,s) and therefore starts
generating results on bar 11 of the test period. Test 2, based on
c>mov(c,200,s) only starts generating results on bar 201 of the tested data.
If there is a big rally in the first, say 150 bars of test data the gain
will be captured by Test 1 and not by Test 2, rendering the comparison
invalid, even though I think I'm using the same set of bars. 

I am therefore looking to set up tests where the code starts to look for
entries at the same bar in both tests, although one may require more
historical data to provide a signal. Hence my solution of delaying any
signals until a period has elapsed greater than the amount of historical
bars required for the longest indicator combination. It means that I have to
load more data, but it makes the results comparable to a real testing
situation - i.e. if I start today to trade a system using a 200 day MA I'm
not going to wait 200 days - I'm going to look back.

Did I explain it better that time?

Andrew



-----Original Message-----
From: Roy Larsen [mailto:rlarsen@xxxxxxxxxxxxxx] 
Sent: Monday, June 28, 2004 3:04 PM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: Re: [EquisMetaStock Group] Equalizing System Starts


Andrew

> I've been concerned about backtesting systems where the indicators 
> used have a significantly different timescale. For example, if I 
> compare a 200 bar moving average crossover system with a similar, 10 
> bar system, then the 10 bar system is going to start generating 
> signals 190 bars earlier than the 200 bar one, which will make 
> nonsense out of the comparison. I have started including a 250-bar 
> delay in my entry signals, viz
>
> EL:= Fml(long entry) AND cum(1)>250;
> Etc.
>
> This seems to be working (although I haven't tested it exhaustively), 
> but I am curious what solutions others have used.
>
> Also, I am wondering if this might cause problems with Roy's 
> Initiation variable in latch formulas.

The thing with an "Init" variable is that it signals when both (or all)
variables are defined. No need for any other delay. The IsDefined() and
IsUndefined() functions can also be used in this way although there'll
rarely be a situation where they are preferable and do the job better.

There's always the prospect of some code being at cross purposes with other
code. But on a positive note there are nearly always several solutions to
any MS problem, and which one you use is just a matter of personal choice.

Roy

> Thanks for your thoughts
>
> Andrew
>
> -----Original Message-----
> From: praktikus_ms [mailto:praktikus@xxxxxxxxxx]
> Sent: Monday, June 28, 2004 8:36 AM
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] Re: unnecessary repetitive signals
>
>
> Hormuz,
>
> Go to the files section of this group and search for a word document 
> called 'Using Latches in MS.doc' by Roy Larsen. This should give you 
> an idea about how solve this problem.
>
> A quick shot would be:
>
> {Trade Latch; Idea by                   }
> {2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
> Set:=Fml(your long therm buy signal);
> Reset:=Fml(your long term sell signal); Init:=Cum(Set+Reset>-1)=1; 
> Trade:=If(BarsSince(Init+Set)<BarsSince(Init+Reset),1,-1);
> Trade; {swings between +1 and -1}
>
> This gives you an output of +1 for the buy signal and -1 for the sell 
> signal. Just assign those to your expert signals and you should doing 
> fine.
>
> Martin
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, hormuz maloo <hormuzmaloo@xxxx> 
> wrote:
> > Hi everybody,
> > I am trying to program my own expert advisor, which
> > gives long-term buy and sell signals.
> > Have just got started, but I find that the buy or sell signal is 
> > repeated everytime the pattern is found on the chart.
> > What I would like to do is see that a buy signal does
> > not follow a buy signal, ie a buy signal should occur
> > only if the previous signal was a sell signal and vice
> > versa.
> > Can somebody please show me a simple way to do this.
> > Thanks in advance,
> > Hormuz Maloo
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>





 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
     equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/