I think you are buying on NEXT BAR opening and selling on ACTUAL BAR closing, 
because you gave a delay of 1 to BUY and a delay of 0 to SELL. That means you 
are selling before you buy. 

Regards

Antonio



From: Peter Pan 
Sent: Monday, April 05, 2010 7:43 AM
To: [email protected] 
Subject: [amibroker] Something wrong: Sharpe Ratio > 10




Hello AmiBroker Community,

i'm testing the behavior of buying of at the OPEN and closing at the CLOSE 
using SetTradeDelays (1,0,0,0); 
For the test i used PremiumData with Russel1000.


SetBacktestMode( backtestRegular);
SetTradeDelays( 1, 0, 0, 0 ); 

BuyPrice = Open;
SellPrice = Close;
PositionScore = 100 - RSI(2);
Buy  = RSI(2) < 50 and ROC(Close,200) > 0;
Sell  = RSI(2) > 50; 


This little system gives me an excellent Sharpe Ratio (~10) , 89% Winners, etc.
I know something is wrong. How could i have built in lookahead bias? The AB 
Code Check returned an ok: no future quotes are referenced

Thanks for your help.
Frank



Reply via email to