Julien,

Many ways to create/reproduce this in AB. First have alook in the manual, in 
particular the rotational trading sections, e.g. search for 
EnableRotationalTrading. This is AB's native approach.

Second, if you need more flexibility, via the RMath plug-in you can fill your 
own (array)matrices with scores, and then rank them. Assuming you have the 
underlying data, and you've looped through your Group, WL, etc. to assign your 
factors per security via VarSet(), you can then assign them to an R matrix, and 
average, rank, etc. these. See example below, where I basically fill a matrix 
with the short rates for the G10 currencies.

TotYld = 0;
YldString = "";
for ( b = 0; (CurrStr = StrExtract( ListCurrMnem, b ) ) != "" ; b++ )
{
        Yld1 = VarGet(NaamYld+CurrStr);
        TotYld = TotYld + Yld1;
        
        RMathSetArray(Nz(Yld1),NaamYld+CurrStr);
        
        if (b<9) YldString = YldString + NaamYld+CurrStr+"," ;
        else YldString = YldString + NaamYld+CurrStr;
}

        
RMathProcedure("Yld_Mat<-cbind("+YldString+")");
RMathProcedure("Yld_Med<-apply(Yld_Mat,1,median)");
RMathProcedure("Yld_Rnk<-apply(Yld_Mat,1,rank)");
DatForm = "%d-%m-%Y";
//RMathProcedure("MatR<-zoo(RMat[,1:3], as.Date(Datum,\""+DatForm+"\"))");
RMathProcedure("Z_YldMatMed<-zoo(Yld_Med, as.Date(Datum,\""+DatForm+"\"))");
//RMathDebugOn();
RMathProcedure("Z_YldMatRnk<-zoo(t(Yld_Rnk), as.Date(Datum,\""+DatForm+"\"))");

Hope this helps & good luck.

PS

--- In [email protected], "jraynal1" <jrayn...@...> wrote:
>
> Hi,
> 
> Being new to Ami Broker, I had a couple questions with regard to the 
> software. I have a model that creates a stock ranking system (z-score 
> aggregate model).  Basically, each stock in the universe is 'scored' or 
> ranked based on a series of fundamental and technical factors. For example, 
> let's say that P/E ratio must be below 15 and below the stock's industry P/E. 
>  Once a ranking system has been built, buy and sell signals are created based 
> on technical factors.  It appears that this process is called "exploration" 
> in AB. 
> 
> Could someone tell me if they have had any experience building ranking 
> systems in AB?
> If so, can you use those ranking systems for back-testing?  Can you rank 
> based on fundamental factors?  If so, can you compare stock factors to 
> industry factors (or sectors)?
> 
> Thanks for any feedback.
> 
> julien
>


Reply via email to