I use the following exploration to create a correlation table:

CorrPd = 30;
list = GetCategorySymbols( categoryGroup , 0);

SetOption("NoDefaultColumns",True);
Filter = Status("LastBarInTest");
SetSortColumns( 1 );
AddTextColumn(Name(),"Correlation",1.0);
Ticker1= Name();

for( Col=0; (Ticker2=StrExtract( List, Col))!= ""; Col++)
{
        Var2 = Foreign(Ticker2,"C");
        Corr = Correlation( C, Var2, CorrPd);
        Color = IIf(Corr>0, colorBrightGreen, IIf(Corr<0,
colorRed,colorWhite));
        Color = IIf(Ticker1==Ticker2, 1, Color);
        AddColumn( Corr, Ticker2, 1.3, 1, Color);
}



Craig


On Mon, Sep 7, 2009 at 6:11 AM, h3po <[email protected]> wrote:

>
>
> Say, I have a Group1 in Amibroker populated with 180 stocktickers. For
> every combination of the stocks in this Group I want to create and calculate
> a Correlation array. What will be the shortest AFLsyntax to accomplish this?
> Any hints appreciated.
> Thanks
>
>  
>



-- 
Broadgun Software
www.pdfmachine.com
www.museum-email-archive.com

Reply via email to