PureBytes Links
Trading Reference Links
|
I would like to find highly correlated pairs of stocks or
indexes that can be traded in a pair hedging strategy. So I am
trying to set up an exploration to run a report showing the percent
correlation between each stock in a group, such as the NYSE list. (I
realize this will probably take hours to run)
For example, I have determined that the correlation between the price
of JPM and BAC is .63 Now I would like to do this calculation for a
large group
Thanks,
Rich
--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx>
wrote:
> Rich,
>
> From the help menu.....
>
> SYNTAX correlation( ARRAY1, ARRAY2, periods )
> RETURNSARRAY
> FUNCTION Calculates correlation between ARRAY1 and ARRAY2 using
periods
> range
> EXAMPLEcorrelation( close, ref( close, -5 ), 5 ); - this calculates
> correlation between close price and and close price 5 days back
>
>
>
> //Load into Indicator Builder
> lookback=10;
> P=Foreign("^NDX","C");//select your Index or ticker
> Plot(Correlation(C,p,lookback),"Correlation",colorRed,styleLine);
>
> which ever chart is opened will show the correlation between that
ticker and
> the ticker in the P variable
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/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/
|