PureBytes Links
Trading Reference Links
|
I don't remember where I got this, but it runs an arbitrary watch list against itself to get a correlation matrix
ReefBreak
// Exploration to create Correlation matrix original by Herman Van Ven Bergen
// In AutoAnalyzer, set Apply to -> Use Filter -> WatchList to same list as Param -> ListNumber (zero based)
// Then set LookBackPeriods
// Modified by ReefBreak
// April, 2008
Listnumber = Param("Listnumber",1,1,263,1);
LookBackPeriods = Param("Lookback Periods",3,1,252,1);
Buy=Sell=Short=Cover=0;
Filter = 1;
list = GetCategorySymbols( categoryWatchlist, Listnumber);
for( NumTickers=0; NumTickers < 99 AND StrExtract( list, NumTickers ) != ""; NumTickers++ );
{
//AddTextColumn(Name(),"Ticker",1.0);
for( Col=0; Col<NumTickers; Col++)
{
Ticker1 = Name();
Ticker2 = StrExtract( list, Col);
Var1 = Foreign(Ticker1,"C");
Var2 = Foreign(Ticker2,"C");
Test = Correlation( Var1, Var2, LookBackPeriods );
Color = IIf(Test>0, colorGreen, IIf(Test<0, colorRed, colorWhite));
Color = IIf(Ticker1==Ticker2, 1, color);
AddColumn( Test, Ticker2, 1.3, color);
}
}
--- In amibroker@xxxxxxxxxxxxxxx, Rajiv Arya <rajivarya87@xxx> wrote:
>
>
> correlation function
>
> To: amibroker@xxxxxxxxxxxxxxx
> From: joseph_occhipinti@xxx
> Date: Thu, 7 Jan 2010 18:46:49 -0800
> Subject: [amibroker] Non-correlated markets in AB
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hi all
>
> Im in the process of looking into a couple of different trading strategies in commodities. I am keen to trade a basket of commodties simultaneously but i am mindful of not chosing a group that are strongly correlated (say 80%+), be it positively or inversely.
>
> My question to AB users is as follows - is there a function in AB that allows me to gauge such information?
>
> Or is it merely a case of eyeballing several charts and overlaying them on each other?
> ieal scenario would be to trade say 8 - 10 markets, all mostly uncorrelated
>
> could be:
> 5 commodities;
> 3 FX;
> 2 indicies.
>
> Cheers
> Joe
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> See what's on at the movies in your area. Find out now..
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/196390706/direct/01/
>
------------------------------------
**** 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/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@xxxxxxxxxxxxxxx
amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|