New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Stock Performance vs. Sector Performance

Hi!

I want to build a scan that selects stocks that outperform the relevant sector. As the performance criteria, I would use, for example, the 3-month SMA average of the stocks’ price vis-à-vis the 3-month SMA of the relevant ETF’s price, such as the XLP’s price (which is the SPDR’s ETF for the consumer staples sector).

Does anyone have any suggestions on how to do it?

By the way, I looked at StockCharts’ Price Relative indicator. But, it looks that the indicator is available for charting, not for scanning.

Thank you!

Dr. T

Comments

  • Maybe play around with this a bit. Don't know if it's new, I never noticed it before.

    Scroll down the the PctRelative. Sounds like you can use a $symbol, or $sector, or $industry. I haven't experimented with it but it might be of assistance? There is a Streak function also for some other questions that were posed at some point on this board. Streak of periods up or down.

    https://stockcharts.com/docs/doku.php?id=scans:functions
  • Dear Imkwin,

    Thank you for your reply!

    Looking for documentation about the PctRelative function, I found the PctChange function and the ROC indicator. All three appear to be relevant to my quest. Hopefully, I will be able to make something work.

    Dr. T
  • I like @lmkwin 's ideas. I'm pretty sure those functions are new. Need to do some experimenting, too.

    In the past, to do what you are thinking about, I've included the relevant sector SPDR or $DJUS industry (or both) in an industry or sector list, then scanned the list using "rank by ROC(63)". In the results list, the better performing stocks come out above the SPDR or $DJUS symbol.

    If you only want to keep the better performing symbols, download the scan results into CSV file, then copy the symbol column down to the SPDR or $DJUS symbol and paste them into a new (or emptied) list (in edit view on the empty list, choose "many", then paste and click OK. This is much faster than than checking dozens of check boxes to delete in edit view.

    Most sectors have more symbols than the list limit of 500, so you need a way to choose the ones you want. I scan by industry with market cap limits, but you could use price limits, or average volume, or dividend payers, or whatever is important to you.
  • Dear MarkD,

    Thank you for your reply!

    I am lost! Can you show me the code of the scan you did?

    Dr. T
  • markdmarkd mod
    edited October 22
    [favorites list is ... ] // your list

    rank by ROC(63) // or other time period, 10, 21, 251 whatever.
  • Dear MarkD,

    Thank you!

    Dr. T
  • Yes, I think that PctRelative function is a very good function to play with.
Sign In or Register to comment.