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

[amibroker] Re: The Watered Down Semi-Interesting System



PureBytes Links

Trading Reference Links

Thomas,

I would agree that the parameter settings of this system are at least 
somewhat fragile.

Fred

--- In amibroker@xxxxxxxxxxxxxxx, "tchan95014 <tchan95014@xxxx>" 
<tchan95014@xxxx> wrote:
> Hi, Fred,
> 
> 
> 
> 
> Thanks for the interesting system you posted.
> 
> 
> 
> 
> In you system development, do you take parameters sensitivity into 
> consideration? I checked the default parameter set you chose, I do 
not 
> know how you do it (optimize all of them takes forever, even larger 
> increments are used), buy they are the set that generates the 
lowest 
> MDD I could find, I actually fine tune every parameters somewhat 
> around your defaults and found them to be the real optimum set.
> 
> 
> 
> 
> If you just shift those parameters minimumly, you will get much 
less 
> favorable results (most the time they are still good, but not as 
> fantastic as the optimum set, net down and MDD up), hence my 
question.
> 
> 
> 
> 
> I usaully, after the optimum parameter set is selected, set again 
the 
> optimization range with the optimum value +/- 20% for EACH 
parameter 
> and re-run the whole optimization to get a feeling of what might 
> expect when the market invariably shifts somewhat its characters, 
call 
> it jitters not any major changes. Of course, in this case it is not 
> practical, for just this small subset would take forever.
> 
> 
> 
> 
> Would like to hear your opinions. Thanks...
> 
> 
> 
> 
> 
> 
> Thomas
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Fred <fctonetti@xxxx>" 
> <fctonetti@xxxx> wrote:
> 
> 
> > Does you AA have all of these ? Buy, Sell, Short, Cover ?  It 
> should.
> 
> 
> > 
> 
> 
> > --- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxxx> wrote:
> 
> 
> > > Fred,
> 
> 
> > >  
> 
> 
> > > When I pasted your code into the equity indicator I'm getting a 
> very
> 
> 
> > > strange error message on this line:
> 
> 
> > >  
> 
> 
> > > FirstBar = ValueWhen(ExRem(Buy OR Short, 0), Cum(1));
> 
> 
> > > 
> 
> 
> > > Its pointing to the OR and saying "Unknown identifier at line 
22, 
> 
> 
> > column
> 
> 
> > > 33:"   I've tried re-typing that part by hand thinking that 
there 
> 
> 
> > was
> 
> 
> > > phantom character in it but that didn't work and I can't figure 
> out 
> 
> 
> > what
> 
> 
> > > the heck is going on.. any idea?
> 
> 
> > > 
> 
> 
> > >  
> 
> 
> > > 
> 
> 
> > > d
> 
> 
> > > 
> 
> 
> > > -----Original Message-----
> 
> 
> > > From: Fred <fctonetti@xxxx> [mailto:fctonetti@x...] 
> 
> 
> > > Sent: Thursday, February 20, 2003 10:39 PM
> 
> 
> > > To: amibroker@xxxxxxxxxxxxxxx
> 
> 
> > > Subject: [amibroker] Re: The Watered Down Semi-Interesting 
System
> 
> 
> > > 
> 
> 
> > > 
> 
> 
> > > Sid,
> 
> 
> > > 
> 
> 
> > > That should not be necessary because that's the first thing in 
the 
> 
> 
> > > Equity Line indicator (See Below).  The code below also 
includes 
> 
> 
> > the 
> 
> 
> > > later thought of ANN%
> 
> 
> > > 
> 
> 
> > > /* */
> 
> 
> > > //--equity-plot-- do not remove this line
> 
> 
> > > 
> 
> 
> > > MaxGraph    = 10;
> 
> 
> > > GraphZOrder =  1;
> 
> 
> > > GraphXSpace = 20;
> 
> 
> > > GraphYSpace = 10;
> 
> 
> > > 
> 
> 
> > > BIR      = IIf(Status("BarInRange") > 0, 1, 0);
> 
> 
> > > 
> 
> 
> > > BarEq    = Equity(1);
> 
> 
> > > CurEq    = Equity();
> 
> 
> > > MaxEq    = Highest(CurEq);
> 
> 
> > > FlatEq   = IIf(BIR, BarsSince(MaxEq > Ref(MaxEq,-1)),0);
> 
> 
> > > MaxFlat  = Highest(FlatEq);
> 
> 
> > > LMaxFlat = LastValue(MaxFlat) * (1 + GraphYSpace / 100);
> 
> 
> > > LogEq    = log10(CurEq);
> 
> 
> > > 
> 
> 
> > > CurDD    = IIf(BIR, 100 * (MaxEq - CurEq) / MaxEq, 0);
> 
> 
> > > MaxDD    = Highest(CurDD);
> 
> 
> > > LMaxDD   = LastValue(MaxDD) * (1 + GraphYSpace / 100);
> 
> 
> > > CumDD    = Cum(CurDD);
> 
> 
> > > 
> 
> 
> > > FirstBar = ValueWhen(ExRem(Buy OR Short, 0), Cum(1));
> 
> 
> > > LastBar  = LastValue(ValueWhen(Status("LastBarInRange") > 0, Cum
> 
> 
> > (1)));
> 
> 
> > > TotBars  = LastValue(Cum(1));
> 
> 
> > > BarNo    = ValueWhen(BIR > 0, Cum(1) - FirstBar + 1);
> 
> 
> > > NoBars   = LastValue(BarNo);
> 
> 
> > > 
> 
> 
> > > Dates    = DateNum();
> 
> 
> > > Days     = ValueWhen(BIR > 0, IIf(Dates != Ref(Dates,-1), 1, 
0));
> 
> 
> > > TotDays  = Cum(Days);
> 
> 
> > > BPD      = BarNo / TotDays;
> 
> 
> > > 
> 
> 
> > > CAR      = ValueWhen(BIR > 0, 100 * ((CurEq / Ref(CurEq, -
(BarNo - 
> 
> 
> > > 1))) ^ (1 / (BarNo / BPD / 252)) -1));
> 
> 
> > > Ann      = ValueWhen(BIR > 0, 100 * ((CurEq / Ref(CurEq, -(252 
* 
> 
> 
> > > BPD)) - 1)));
> 
> 
> > > MAR      = ValueWhen(BIR > 0, CAR / MaxDD);
> 
> 
> > > UI       = ValueWhen(BIR > 0, sqrt(CumDD / BarNo));
> 
> 
> > > UPI      = (CAR - 5.4) / UI;
> 
> 
> > > TPI      = UPI / MaxDD;
> 
> 
> > > 
> 
> 
> > > bb0      = LastValue(LinRegIntercept(Ref(LogEq, -(TotBars - 
> 
> 
> > > LastBar)), NoBars));
> 
> 
> > > mm       = LastValue(LinRegSlope(Ref(LogEq, -(TotBars - 
LastBar)), 
> 
> 
> > > NoBars));
> 
> 
> > > yy       = mm * BarNo + bb0;
> 
> 
> > > 
> 
> 
> > > BarsCum  = ValueWhen(BIR > 0, Cum(BarNo));
> 
> 
> > > AvgBar   = LastValue(BarsCum) / NoBars;
> 
> 
> > > SRDevSQ  = ValueWhen(BIR > 0, sqrt(Cum((BarNo - AvgBar) ^ 2)));
> 
> 
> > > ErrEq    = LastValue(StdErr(Ref(logEq, -(TotBars - LastBar)), 
> 
> 
> > > NoBars));
> 
> 
> > > KRatio   = ValueWhen(BIR > 0, mm * SRDevSQ / ErrEq / 
> sqrt(NoBars));
> 
> 
> > > 
> 
> 
> > > TradeEq  = IIf(Sell, (BarEq - ValueWhen(Buy, BarEq)) / ValueWhen
> 
> 
> > (Buy, 
> 
> 
> > > BarEq), 0) +
> 
> 
> > >            IIf(Cover, (BarEq - ValueWhen(Short, BarEq)) / 
> ValueWhen
> 
> 
> > > (Short, BarEq), 0);
> 
> 
> > > PosEq    = Cum(IIf(TradeEq > 0, TradeEq, 0));
> 
> 
> > > NegEq    = Cum(IIf(TradeEq < 0, TradeEq, 0));
> 
> 
> > > PosTrade = Cum(TradeEq > 0);
> 
> 
> > > NegTrade = Cum(TradeEq < 0);
> 
> 
> > > AvgPos   = PosEq / PosTrade;
> 
> 
> > > AvgNeg   = NegEq / NegTrade;
> 
> 
> > > PosPct   = PosTrade / (PosTrade + NegTrade);
> 
> 
> > > Expect   = (1 + AvgPos / abs(AvgNeg)) * PosPct - 1;
> 
> 
> > > 
> 
> 
> > > Plot(IIf(BarNo > 0, CAR,    -1e10), "CAR%",  colorBrightGreen, 
> 
> 
> > > styleNoLine | styleNoLabel);
> 
> 
> > > Plot(IIf(BarNo > 0, Ann,    -1e10), "Ann%",  colorBrightGreen, 
> 
> 
> > > styleNoLine | styleNoLabel);
> 
> 
> > > 
> 
> 
> > > Plot(IIf(BarNo > 0, -CurDD, -1e10), "CDD%",  colorRed,         
> 
> 
> > > styleOwnScale | styleHistogram, -LMaxDD, LMaxDD);
> 
> 
> > > Plot(IIf(BarNo > 0, -MaxDD, -1e10), "MDD%",  colorDarkRed,     
> 
> 
> > > styleOwnScale,                  -LMaxDD, LMaxDD);
> 
> 
> > > 
> 
> 
> > > Plot(IIf(BarNo > 0, MAR,    -1e10), "MAR",   colorBrightGreen, 
> 
> 
> > > styleNoLine | styleNoLabel);
> 
> 
> > > 
> 
> 
> > > Plot(IIf(BarNo > 0, UI,     -1e10), "UI",    colorYellow,      
> 
> 
> > > styleNoLine | styleNoLabel);
> 
> 
> > > //Plot(IIf(BarNo > 0, UPI,    -1e10), "UPI",   
colorGreen,       
> 
> 
> > > styleNoLine | styleNoLabel);
> 
> 
> > > //Plot(IIf(BarNo > 0, TPI,    -1e10), "TPI",   
colorGreen,       
> 
> 
> > > styleNoLine);
> 
> 
> > > //Plot(IIf(BarNo > 0, Expect, -1e10), "Exp",   
colorGreen,       
> 
> 
> > > styleNoLine);
> 
> 
> > > //Plot(IIf(BarNo > 0, KRatio, -
1e10), "KRatio",colorGreen,       
> 
> 
> > > styleNoLine | styleNoLabel);
> 
> 
> > > 
> 
> 
> > > Plot(IIf(BarNo > 0, FlatEq, -1e10), "CF",    colorYellow,      
> 
> 
> > > styleOwnScale | styleHistogram, -LMaxFlat, LMaxFlat);
> 
> 
> > > Plot(IIf(BarNo > 0, MaxFlat,-1e10), "MF",    colorDarkYellow,  
> 
> 
> > > styleOwnScale,                  -LMaxFlat, LMaxFlat);
> 
> 
> > > 
> 
> 
> > > Plot(IIf(BarNo > 0, yy,     -1e10), "LinReg",colorBlue,        
> 
> 
> > > styleThick | styleOwnScale | styleNoLabel);
> 
> 
> > 
>                                                                    
>  
> 
> 
> >   
> 
> 
> > >                                      
> 
> 
> > > 
> 
> 
> > > --- In amibroker@xxxxxxxxxxxxxxx, Sidney Kaiser <s9kaiser@xxxx> 
> 
> 
> > wrote:
> 
> 
> > > > At 08:04 PM 02/20/2003 -0500, you wrote:
> 
> 
> > > > 
> 
> 
> > > > >Fred,
> 
> 
> > > > >
> 
> 
> > > > >I get an error in the "FirstBar = ValueWhen(ExRem(Buy OR 
Short, 
> 
> 
> > > 0), 
> 
> 
> > > > >Cum(1));" at the OR location....
> 
> 
> > > > >
> 
> 
> > > > >Can you provide assistance
> 
> 
> > > > 
> 
> 
> > > > Not Fred, but maybe I can help.  That is the error message I 
got 
> 
> 
> > > when the 
> 
> 
> > > > AA system results were not communicating with the indicator 
> 
> 
> > > module.  Check 
> 
> 
> > > > to see that you have   /*   at the bottom of the AA system 
> 
> 
> > script.  
> 
> 
> > > That 
> 
> 
> > > > seems to enable the link between the tester and the indicator 
> 
> 
> > code.
> 
> 
> > > > 
> 
> 
> > > > Sid
> 
> 
> > > > 
> 
> 
> > > > 
> 
> 
> > > > ---
> 
> 
> > > > Outgoing mail is certified Virus Free.
> 
> 
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> 
> 
> > > > Version: 6.0.455 / Virus Database: 255 - Release Date: 
> 02/13/2003
> 
> 
> > > 
> 
> 
> > > 
> 
> 
> > > 
> 
> 
> > > Yahoo! Groups Sponsor	
> 
> 
> > > 
> 
> 
> > > ADVERTISEMENT
> 
> 
> > >  
> 
> 
> > > 
> 
> 
> > 
> 
<http://rd.yahoo.com/M=243066.2784922.4151385.1927555/D=egroupweb/S=17
> 
> 
> > 05
> 
> 
> > > 632198:HM/A=1377501/R=0/*http://www.verisign.com/cgi-bin/go.cgi?
> 
> 
> > a=b30890
> 
> 
> > > 113200616000> 	
> 
> 
> > >  
> 
> 
> > > <http://us.adserver.yahoo.com/l?
> 
> 
> > M=243066.2784922.4151385.1927555/D=egrou
> 
> 
> > > pmail/S=:HM/A=1377501/rand=603208677> 	
> 
> 
> > > 
> 
> 
> > > Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx 
> 
> 
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> 
> 
> > > 
> 
> 
> > > Check group FAQ at:
> 
> 
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> 
> > > 
> 
> 
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
> Service
> 
> 
> > > <http://docs.yahoo.com/info/terms/> .


Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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