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

Re: [amibroker] AFL, pairs trading



PureBytes Links

Trading Reference Links



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 <h3pooo@xxxxxxxxx> 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


__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___