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

[amibroker] Re: Help: Position Scores don't agree with Buys for Standard Backtest



PureBytes Links

Trading Reference Links

Udo,

Thanks for taking the time to read and respond to my Post, and
suggest where the issue was.  If only you were right, I would be
rich!

I have figured out the issue, and it is not a difference in the
third or fourth decimal point of the Position Score - it was huge.
So that others may benefit from my learnings, I will document what I 
found.

I used Buy=1 so that all symbols on all bars would have a buy 
signal.  I was counting on the Position Score Condition to then 
select which stocks to buy, as the Buy Condition was essentially 
redundant with the PositionScore Condition.  However, what was 
happening, is that the SELL Condition was being used in combination 
with the Position Score to select which stocks to buy.  This resulted 
in an astronomical annual rates of return (6000%+), because my SELL 
condition when used in this way looked ahead and insured a positive 
profit on each trade.   So the morale of the story is always specify 
some type of Buy condition code when using Position Score, even if it 
exactly the same as the Position Score, else screwy things happen.   
Maybe this is explained in the documentation, but if so I missed it.

Dave

--- In amibroker@xxxxxxxxxxxxxxx, Udo Harke <udoharke@xxx> wrote:
>
>  
>   Hello Dave,
>    
>   Suppose that you have designed a very simple strategy to perform 
and verify the position-score test, and the numbers reflecting the 
position ranking differ up to the 3rd places to the right of the 
decimal point. In this case you should really evaluate the formula 
defining the position scores!
>   However, in case the position scores differ beyond the 4th places 
to the right of the decimal point, then it might well happen that 
rounding errors play an adverse side effect for choosing the 
appropriate stock candidates.
>    
>   Hope that helps somewhat .
>    
>   Cheers,
>    
>   Udo
>   
> 
> cohndw <minimax9999@xxx> wrote:
>   This is for a standard portfolio backtest (not CBT) of the daily
> Nasdaq 100 from 1996 to 2006.  The strategy allows only one open
> position at a time and has very simple Buy, Sell, and PositionScore
> conditions.  The Position Scores listed in the detailed log report
> exactly match those written out to a debug file (using a bar loop 
with
> PositionScore[bar] at the bottom of the AFL).  The matches validate
> the debug file data is correct.  The problem is that symbols 
selected
> for Buys do not have the maximum Position Score, and are often way
> down the list.  The detailed log report shows the higher scoring
> symbols are NOT listed for exits, so I am lost for an explanation of
> why symbols with much lower Position Scores are being selected for
> Buys.   Note the symbols in the portfolio have different date ranges
> because many symbols have come and gone in the Nasdaq 100 between 
1996
> and 2006.  The date ranges are built into the symbol names to allow
> the same symbol with different (non-overlapping) date ranges to be
> part of the portfolio.   Are the different date ranges causing an
> issue with bar alignment and thus PositionScores?  Is there 
something
> else that I may be doing wrong?
> 
> Any insight would be appreciated.
> 
> Thanks,
> 
> Dave
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> 
> 
>     
> ---------------------------------
>   YAHOO! GROUPS LINKS 
> 
>     
>     Visit your group "amibroker" on the web.
>     
>     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. 
> 
>     
> ---------------------------------
>   
> 
> 
> 
> 		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone 
call rates.
>







Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
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:
    http://docs.yahoo.com/info/terms/