StockFetcher Forums · General Discussion · Is there anyone out here that can write this filter(s)?<< >>Post Follow-up
marine2
829 posts
msg #114979
Ignore marine2
8/20/2013 2:21:59 PM

Is there anyone out here that knows how to create a filter that compares two stocks against each other, graphically (chart form), that shows visually their relationship between them. Example showing SPY vs GLD on one chart.

Taking this concept a little deeper, show two equities (stocks or ETF's) where their price lines cross and go in different directions.

Looking for equities that are like oil and water to each other. Can anyone write a filter showing this unique interaction between two equities?

Your help on this is always appreciated.

dangreene
133 posts
msg #114980
Ignore dangreene
8/20/2013 2:58:37 PM

marine2

This should give you a start.

dangreene
133 posts
msg #114981
Ignore dangreene
8/20/2013 3:01:58 PM

Fetcher[
symlist(fas,faz)

chart-type line

compare faz to fas
]



marine2
829 posts
msg #114982
Ignore marine2
8/20/2013 3:03:14 PM

Thank you. I will fiddle with this and see how it works for me.


marine2
829 posts
msg #114983
Ignore marine2
8/20/2013 3:16:54 PM

Is there any way to create a filter that would automatically show us opposite in nature equities, showing the two equities on one chart not two individual ones? Or if it couldn't do this graphically maybe it could show us the opposites in list form?


yepher
353 posts
msg #114985
Ignore yepher
modified
8/20/2013 3:47:48 PM

@marine2

You can display the two on the same chart by doing something like this:

Fetcher[
set{sym1, ind(spy, close)}
set{sym2, ind(gld, close)}

close equals sym1

add column sym1
add column sym2
draw sym1 on plot sym1
draw sym2 on plot sym1
]



See the "sym1,sym2" graph

I am not 100% sure what you meant by the other part of your question. You cannot automatically scan all stocks to see which ones cross and diverge. You can determine which ones are like oil to a specific water. To do that you need to use the crosses or converges some number of days and and diverging with ind(...). The symbol in "ind(...)" is the water and it will find the oil for you ;)





Kevin_in_GA
4,548 posts
msg #114988
Ignore Kevin_in_GA
8/20/2013 4:19:41 PM

Fetcher[
show stocks where close is above 10
and average volume(30) is above 250000
and corr(^SPX,60,Close) is below 0
and add column corr(^SPX,60,Close)
and compare with ^SPX

sort on column 5 ascending
]



No surprise here that the inverse etfs for ^SPX are at the top of this list, but there are some toher candidates that might be of interest.

Another thought - within the S&P 500 there are likely to be a top and bottom correlated stock - perhaps these would be a good "oil and water" pair?

Fetcher[

S&P 500
add column corr(^SPX,252,Close)
and compare with ^SPX

sort on column 5 descending
]



Among the highest correlated is GOOG, and among the lowest is AAPL. Here's a chart over the past year:

http://stockcharts.com/h-sc/ui?s=AAPL&p=D&yr=1&mn=0&dy=0&id=p74885195661



marine2
829 posts
msg #114990
Ignore marine2
8/20/2013 9:01:33 PM

Thanks to all of you for helping me on this subject. Wishing you good returns on your investment actions.

StockFetcher Forums · General Discussion · Is there anyone out here that can write this filter(s)?<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus