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

[amibroker] Exploration vs. Backtest



PureBytes Links

Trading Reference Links




I have stared at 
this for a couple of hours...
I just don't see 
where it is off, I'm using 1 month of Intraday data, trading at the Close, 
Delay 0, Long Only
<FONT face=Arial 
size=2> 
Why 
doesn't the Exploration match the Backtest Report ... 
It's close, but not the same ...
1) Where 
is my rounding error in the Exploration 
calc's?
<FONT face=Arial 
size=2>and
2) Why 
do the Drawdowns not match the Backtest Report (Using Worst 
Case)
<FONT face=Arial 
size=2> 
Thanks in advance 
for any suggestions...
<FONT face=Arial 
size=2> 
Mr. 
Valley
<FONT face=Arial 
size=2> 

BIR = IIf(<FONT 
color=#0000ff size=1>Status(<FONT color=#ff00ff 
size=1>"BarInRange") > <FONT color=#ff00ff 
size=1>0, 1<FONT 
size=1>, 0);
CurEq = Equity();
MaxEq = Highest<FONT 
size=1>(CurEq);
CurDD = IIf(BIR, 
100 * (MaxEq - CurEq) / 
MaxEq, 0);
MaxDD = Highest<FONT 
size=1>(CurDD);
NumOfShares = round<FONT 
size=1>(CurEq / Close);
Commission = 22.00; 
// RoundTurn Commission Setting 11.00 Each for 
Buy and Sell - Change as Needed 
BP1 = ValueWhen( 
Buy, C, 1); 
//BP1 = BuyPrice;
SP1 = ValueWhen( 
Sell, C, 1); 
//SP1 = SellPrice;
Profit = (( SP1 - Ref( 
BP1,-1) ) * NumOfShares) - 
Commission ;
CumProfit = Cum( 
IIf( <FONT 
color=#0000ff size=1>IsEmpty( Profit * Sell ), 
0, Profit * Sell ) 
);
Filter = Sell; 
AddColumn( Buy, <FONT color=#ff00ff 
size=1>"Buy", format = <FONT color=#ff00ff 
size=1>1.2, textColor = colorDefault, bkgndColor = 
colorDefault ) ; 
AddColumn( Sell, <FONT color=#ff00ff 
size=1>"Sell", format = <FONT color=#ff00ff 
size=1>1.2, textColor = colorDefault, bkgndColor = 
colorDefault ) ; 
AddColumn( Short, <FONT color=#ff00ff 
size=1>"Short", format = <FONT color=#ff00ff 
size=1>1.2, textColor = colorDefault, bkgndColor = 
colorDefault ) ; 
AddColumn( Cover, <FONT color=#ff00ff 
size=1>"Cover", format = <FONT color=#ff00ff 
size=1>1.2, textColor = colorDefault, bkgndColor = 
colorDefault ) ; 
//AddColumn( BuyPrice, "BuyPrice", format = 1.2, textColor = colorDefault, 
bkgndColor = colorDefault ) ; <FONT color=#008000 
size=1>
//AddColumn( SellPrice, "SellPrice", format = 1.2, textColor = colorDefault, 
bkgndColor = colorDefault ) ; <FONT color=#008000 
size=1>
//AddColumn( ShortPrice, "ShortPrice", format = 1.2, textColor = 
colorDefault, bkgndColor = colorDefault ) ; <FONT 
color=#008000 size=1>
//AddColumn( CoverPrice, "CoverPrice", format = 1.2, textColor = 
colorDefault, bkgndColor = colorDefault ) ; <FONT 
color=#0000ff size=1>
AddColumn( Close, <FONT color=#ff00ff 
size=1>"Close", format = <FONT color=#ff00ff 
size=1>1.2, textColor = colorDefault, bkgndColor = 
colorDefault ) ; 
AddColumn( Profit, <FONT color=#ff00ff 
size=1>"Profit", format = <FONT color=#ff00ff 
size=1>1.2, textColor = colorDefault, bkgndColor = 
colorDefault ) ; 
AddColumn(C, <FONT color=#ff00ff 
size=1>"Close",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(O, <FONT color=#ff00ff 
size=1>"Open",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(L, <FONT color=#ff00ff 
size=1>"Low",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(H, <FONT color=#ff00ff 
size=1>"High",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(CumProfit , <FONT color=#ff00ff 
size=1>"CumProfit ",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(NumOfShares, <FONT color=#ff00ff 
size=1>"NumOfShares",<FONT color=#ff00ff 
size=1>1.0<FONT 
size=1>);
AddColumn(MaxEq,<FONT color=#ff00ff 
size=1>"MaxEq",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(CurEq,<FONT color=#ff00ff 
size=1>"Equity()",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(-CurDD,<FONT color=#ff00ff 
size=1>"CDD%",<FONT color=#ff00ff 
size=1>1.2);
AddColumn(-MaxDD,<FONT color=#ff00ff 
size=1>"MDD%",<FONT color=#ff00ff 
size=1>1.2);






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.