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

[amibroker] Re: Backtesting a Score Based System in AB



PureBytes Links

Trading Reference Links

Here is an interesting selection method :
Run first the
Buy=Cross(StochD(),35);
Sell=Cross(65,StochD());// the trading rules
e1=LastValue(Equity());
e2=IIf(e1>10000,e1,0);
AddToComposite(e2,"~e2","c");
AddToComposite(e1>10000,"~profitables","v");
Buy=0;
for all stocks, n=1 last quotations.
With the line
e2=IIf(e1>10000,e1,0); you filter out loosing stocks and with
AddToComposite(e1>10000,"~profitables","v"); you count the profitable 
ones.
Then select the top stocks with the exploration
Buy=Cross(StochD(),35);
Sell=Cross(65,StochD());
e1=LastValue(Equity());
e11=Foreign("~e2","c")/Foreign("~profitables","v");
f=1;
Filter=e1>f*e11;
AddColumn(e1,"e1");
AddColumn(e11,"e11");
for all stocks, n=1 last quotations.
In this exploration you ask, among the profitable stocks, these 
equities above the average.
Note1: If you see more than 10 stocks, increase f=1 to f=1.2 or f=1.5.
Note 2 : If you still see more than 10 stocks, then you have a great 
system and take action tomorrow morning
without any further delay !!!
DT

--- In amibroker@xxxxxxxxxxxxxxx, uenal.mutlu@xxxx wrote:
> In a score based trading system each stock gets
> some (weighted/normalized) scores assigned and 
> all the scores of the underlying indicators and methods
> are cumulated for each stock. From this list I would
> like to take the first (or the first x) stocks for backtesting.
> How could this be realized in an exploration or in the backtester?
> One would need to filter and collect the stocks meeting
> the underlying criteria and then would need to sort the 
> table and pick item number(s) and assign them to the Buy array.
> This would be very interessting for testing the performance
> of such a system in ABs backtester. 
> Can this be done in AB?
> 
> UM


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

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