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

Re: [amibroker] Russell 2000 constituent lists



PureBytes Links

Trading Reference Links


I was wondering if anyone has experimented with correlation studies of a stock relative to an index on a day when the index is up and when the index is down.   Since I trade mostly Nasdaq stocks I'm trying to put together an indicator that shows the correlation of a stock when the Nasdaq is up and when the Nasdaq is down.  I'm having quite a bit of trouble since  I haven't really used the IIF function and I'm not sure if I need to create composites.  I put this together so far but it is way off base (I'm afraid it's too simplistic!) - what happens is both studies are the complete inverse of each other.  
 

x=Foreign("!comp","Close");
Nasup = x >= Ref(x,-1);
Nasdown = x < Ref(x,-1);
IIf(x> Ref(x,-1),Nasup,Nasdown);
y= Correlation(Nasup,C,100);
z=Correlation(Nasdown,C,100);
Plot(y,"Nasdaq Up Correl",3,1,1,1);
Plot(z,"Nasdaq Down Correl",4,1,1,1);
 
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes


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





Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.