PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Patrick,
check
the settings in AA. perhaps you are using a buy/sell delay or entering/ exiting
on high or low instead of the close you use in your exploration...... You might
have a look at the back testing tutorial in the help
files
Regards,Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: vlanschot
[mailto:ecbu@xxxxxxxxxxxxxx]Sent: Friday, May 14, 2004 4:37
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
Help: different results Explore vs Individual
BacktestHello AB Community,Perhaps somebody
can help me with the following.Below I have a simple example strategy
which I run in both Explore and Individual Backtest. You can use any group
of securities yourself to replicate. The problem is that I get
different results in the Equity(1) (here: IndivEq) via Explore versus the
results shown in the Individual Backtest. Differences amount to a couple
of dollars to a few thousand. So the question is: how can I make sure that
I get the same (equity) results in Explore and in the Individual
Backtest.No doubt there is a simple explanation here, but I can't
figure it out.Thanks in advance for your
help.PatrickFilter=1;Groep=GroupID();List =
GetCategorySymbols(categoryGroup,Groep);//SetBarsRequired(10,10);
MPLB=126; //DailyAnnPer = 256;for( n=1;
(Ticker=StrExtract( List, n))!= ""; n++){k=n+1;}
//TypeBacktest=Status("action");Scan =
Status("Action")==3;Indicator = Status("Action")==1;Explore =
Status("Action")==4;Backtest =
Status("Action")==5;SetOption("InterestRate",0);SetOption("MaxOpenPositions",k);SetOption
("CommissionMode",1);CommPerc =
Param("Commission%",1,0.25,5);SetOption("CommissionAmount",
CommPerc);WLScan = 0;if (Scan AND WLScan==1)// = Scan Mode for
Next day's tradesDelay = 0;elseDelay = 1;SetTradeDelays(
Delay, Delay, Delay, Delay );StartCapital = 1000000;PFBT =
0;if (Scan OR Explore OR (Backtest AND
PFBT==0))SetOption("InitialEquity",StartCapital/k);elseif
(Backtest AND PFBT==1)
SetOption("InitialEquity",StartCapital);BarInTest=Status("barinrange");ValidB=//1;BarIntest==1;Buy=ValidB
AND MACD()>Signal() ; Sell = ValidB AND Signal()>MACD(); //Short
= Sell; Cover = Buy; Short=0; Cover =
0;BuyPrice=SellPrice=ShortPrice=CoverPrice=Close;SigEq=1;IndivEq
= Equity(SigEq); AddToComposite( Indiveq, "~ComposEq", "C" );ComposEq
= Foreign("~ComposEq","C");PFBTCap =
LastValue(ValueWhen(Status("firstbarinrange"),ComposEq));if(Backtest
AND
PFBT==1)PositionSize=//IndivEq;-IndivEq/ComposEq;//-100/k;elsePositionSize=-100;PositionScore
= //1;100 - RSI(14);AddColumn(Indiveq,"IndivEq",
1.3);AddColumn(ComposEq,"CompEq", 1.3);Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|