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.

Advanced Scan using indicator "Price Performance", with "Relative Price"

My default Chart Style has these settings, I am trying to create a scan based on them ...

In the "indicator" list I select "Price Performance" ...
- In "parameter" I type "Symbol:$SPX" (to gauge performance v S&P),
- within "advanced options" in "overlay" list I select "simple moving avg" and in "parameter" I type 20

Scan would show where Symbol "price performance" relative to S&P is > the price relative SMA
Example: (symbol:$SPX) *1.03 is > (SMA,20,symbol:$SPX).

Thank you for your help!
Notty Trader

Best Answers

  • KevoKevo
    Answer ✓
    This topic is a conundrum for me. It's like having a big wrench stuck in my gearbox. I have not seen any experts at SCC clearly explain Price Performance with Price Relative. See my post here on the subject: Interpreting Price Relative plotted on the Price Performance Indicator. I think I finally have a clue about this. I had to do all the heavy lifting on my own. I also plan to update my post on the topic too. Let me know if I am wrong about anything.

    Relative Price Performance is not the same thing as Price Relative. Price Relative only measures if something is out-performing or under-performing. It does not measure the magnitude or the degree of the out/under performance.

    Relative Price Performance does measure the magnitude of the out/under performance. It is a different calculation than Price Relative. Price Performance is different than Relative Price Performance because Relative Price Performance uses a baseline where the baseline is subtracted from the the symbol being plotted. Price Performance does not use a baseline. Price Performance and Relative Price Performance are accomplished via Performance Charts. They are known as PerfCharts on SCC.

    The "Price - Performance" indicator in SCC is a means to bring PerfCharts to the SharpCharts workbench. This results in a scaled down version of PerfCharts. I think one of the drawbacks to the "Price - Performance" indicator is that you cannot add a baseline to it like you can in the other two versions of PerfCharts on SCC.

    An unintended consequence of this "Price - Performance" PerfChart to SharpChart integration is that you can add a Price Relative to it. By adding this Price Relative, this does not mean a symbol it outperforming by X.X% because the calculation used in the Price Relative is wrong for measuring degree of out/under-performance.

    Is it meaningful to compare two Price Relatives like how NottyTrader has in his example? This is an interesting question that I am not sure about. My guess would be no. For example, if the slope of one Price Relative is greater than the slope of another Price Relative, does this mean the first Price Relative has a greater out-performance than the second? I don't know! I will have to figure this out. The only way to really know is to look at the two in a Relative Price Performance PerfChart. Multiplying a Price Relative * 1.03 in NottyTrader's example would not work, maybe only comparing slope, or distance from a MA.

    I left out a lot of details, but I hope this makes sense. Please provide some feedback, and let me know if I am wrong about anything. This is an interesting topic that is not getting adequate attention.
  • KevoKevo
    edited December 2014 Answer ✓
    (*) Hi all, I would like to revisit this again. Does Price Relative reveal degree/magnitude/how much out/under performance, or do you have to use a Relative Price Performance chart for that?

    I know that you can apply indicators to Price Relative charts. This means that Price Relative charts can have momentum, trend, and be overbought and oversold. So, if one Price Relative chart has more momentum than a second Price Relative chart, does that mean that the first Price Relative chart has a higher magnitude of out-performance than the second? I guess so. So, maybe you do not have to rely on a Relative Price Performance chart to to measure how much or magnitude of out-performance. I am still trying to better understand this.......

    I do think that applying Price Relative to the "Price - Performance" indicator is misleading and can be dangerous because end values of Price Relative mean nothing. What makes it worse is that the "Price - Performance" indicator converts that end value to a percentage, which gives you the false impression that the Price Relative is out-performing by this much. I think this could be very dangerous. What you have to do is create a Price Relative chart, and then apply indicators to a Price Relative chart. Then look at momentum and OB/OS. This is more meaningful and takes more work. Comments Please? :)
  • markdmarkd mod
    edited December 2014 Answer ✓
    I think NT just wants a scan for stocks where Price-Performance is above its moving average.

    Maybe I just don't have it today, but I don't understand how Gord's answer addresses that. You can't scan for price performance directly, so how can you scan for it's moving average or it's position vs. the moving average?
  • markdmarkd mod
    Answer ✓
    Sorry, Kevo, I've read your posts three times, and I'm not sure what you are getting at. Can you put the basic problem in like three sentences?

    Are you trying to pick stocks based on whether one's outperformance vs. an index is better than another's?
  • KevoKevo
    Answer ✓
    Hi markd and all, it would be great for all of us to be on the same page. I will try. My comments above started to leave the scope of this topic. So, I will continue on a different post. I have more on this topic. I am not trying to answer NT's scan question. I am trying to explain an issue that caused him to start this post.

    There are a couple of small problems. First, NT is using the "Price - Performance" indicator incorrectly. He is dropping a Price Relative on this indicator. This is not that huge of a problem, but it is misleading. If one understands this problem, then I think that raises one's skill level and knowledge of Technical Analysis a notch. See the lengthy comments above for the explanation. NT started this post because of the misleading affects of this problem. Second, it is not possible to use a Price Relative in the scan engine.

    Gord's scan does not directly address NT's question, but it is the closest next best thing that is possible via the scan engine. By the way, I figured out a question I had about gord's scan.

    I fell for the same mistake as NT. I recently started to figure this out. I am not an expert. Please correct me if I am wrong. It would be great if an authority would verify comments above.

    Since it is not possible to scan for a Price Relative, I then proceeded to explain a way to accomplish what NT is trying to do in the comments above.
  • markdmarkd mod
    edited December 2014 Answer ✓
    Well, to get us on the same page, here's how I understand it:

    If you want "price relative", you select "Price" from "Indicators" and you put "symbol:$SPX" in "Parameters" (it doesn't have to be $SPX, could be anything else).

    You get an indicator window with a right hand scale in decimals. The current value is the result of dividing the symbol close by the $SPX close. It means that the symbol's close is some fraction of the $SPX close, expressed as a decimal. If the symbol's close advances more tomorrow (or falls less) relative to the $SPX, tomorrows decimal will be higher. If the $SPX advances more (or falls less), the decimal will be lower.

    If you want "Price-Performance", you select the "Price-Performance" indicator from "Indicators" and again you put "symbol:$SPX" in "Parameters".

    Now you get an indicator window with a right hand scale in per cents. The calculation divides the difference in symbol's change in price since bar 1 by $SPX's change in price since bar 1, and plots the difference in the per cent change. So if symbol advanced 12% and $SPX advanced 10%, then symbol advanced 20% more than $SPX, and the indicator will read +20%. Tomorrow, the calculation method will be the same, but the values will change. Today's bar 2 will become tomorrow's bar 1, and there will be a new close. But like the price relative calculation, if symbol's difference tomorrow between bar 1 and the current close is greater than $SPX's, the per cent value will increase, if it's less the per cent value will decrease.

    If you compare the shape of the line for these two indicators, they are exactly the same, but the values produced by the different calculations give you different information. Price relative is the ratio of two closes; Price-Performance is the ratio of two changes in price over a period of time.
  • markdmarkd mod
    Answer ✓
    Forgot this: Another difference between price relative and Price-Performance is: for the same ending date, price relative returns the same value no matter the the length of the chart - 3 weeks, 3 months, 3 years. Price Performance will return a different value for each time period.
  • markdmarkd mod
    edited December 2014 Answer ✓
    Sorry, interrupted.

    Also, you can't compare two stocks by their price relative values. If IBM's price relative is .08, that doesn't mean it's doing better or worse than ORCL at .02.

    But, if you compare Price Performance of each stock vs. the $SPX for a particular time period, say 6 months, IBM is -16.65% and ORCL is -7.78%, so over six months, IBM is doing worse than ORCL. If you were to choose another time period, you would get a different result.

    I haven't explored adding indicators to price relative or Price-Performance, except, like NT, moving averages. It seems too far removed from the actual price action, and I'm a little skeptical of applying TA to anything but the actual price chart, except maybe trend lines and MAs. But that's just me.
  • KevoKevo
    Answer ✓
    Hi markd, thank you for the explanation. I read carefully what you are saying. I did get lost a little in one part of your explanation. I have done some homework on Price - Performance. I might have to do more.

    Here is my understanding of Price - Performance. Remember that the Price - Performance indicator is a PerfChart to SharpChart conversion. So, we are really talking about Performance Charts (PerfCharts). According to SCC Chart School, Performance is defined as "Percent Change of closing price over time". Click here for link to definition. Performance is a different calculation than Price Relative.

    Here is a definition of Percent Change from Google: "Subtract the old from the new, then divide by the old value. Show that as a Percentage." The formula is (new value - old value)/(old value) then multiply by 100%. There are two ways to calculate Percent Change. The second method is: (new value)/(old value) - 1, then convert to a percentage.

    The starting data point value on the Performance chart is always zero for price bar 1.The calculation for the second point on the plot is [(Price at bar 2)/(Starting price at bar 1) - 1]*100%. The third point on the plot is [(Price at bar 3)/(Starting price at bar 1) -1]*100%. This is what we would call plotting absolute performance on the PerfChart. This is also exactly what the SharpChart Price - Performance indicator does.

    PerfCharts and the SharpCharts Performance indicator expects price as input. Price Relative is not price. It is a ratio. So a ratio is getting plotted onto the Price - Performance indicator, but the Price - Performance indicator does not know that. It assumes a price is getting plotted. PerfCharts is a robust interface that does not allow a ratio as input. It only allows price. The SharpCharts interface has a more open interface.

    PerfCharts are capable of a second type of chart and that is Relative Price Performance Charts with a baseline. This calculation is slightly different than the Regular Price Performance chart. The calculation is to subtract the performance of the baseline from the performance of the symbol. So if symbol X has absolute performance of 1.1% at bar 2 and the baseline ($SPX) has absolute performance of 2% at bar 2, then the plot would be -0.9% at bar 2. If symbol X has absolute performance of -0.5% at bar 3, and the baseline ($SPX) has absolute performance of -0.1% at bar 3, then the plot at bar 3 is -0.4%.

    Click here for link to definition of Relative Price Performance by Mr. Anderson.

    I did find the calculation definition of Relative Price Performance in this attached Stocks and Commodities magazine article. This is the source document I use for the basis of my arguments, and the reason why I am bringing attention to this topic. "Relative Performance Charting by Phil Doyle". The source article can be found on SCC by searching "Relative Performance Charting". The source article is attached to this post below for convenience. I took this as reliable and factual information. Let me know if there is something wrong or missing.

    Now, the question becomes, is Price Relative plotted on the Performance Chart/Indicator the same thing as the Relative Price Performance Chart? I would say no for the following reasons:
    1. According to the S&CM article, Price Relative is quantified via the Relative Price Performance chart, not by plotting Price Relative on a Performance chart.
    2. Price Relative is a different calculation than Relative Price Performance.
    3. The Price - Performance indicator expects price as input. Price Relative is not price.
    4. The Performance indicator is calculating Percent Change of the decimal results of Price Relative. Does this mean anything?

    What does the Price - Performance of Price Relative mean on it's own? Well, the end value is not important, only the shape of the line is important. You can apply TA to Price Relative charts to get information other than quantifying out-performance (which is accomplished via Relative Price Performance Charts).

    This seems long. I am not sure I want to write a book on this.
  • markdmarkd mod
    edited December 2014 Answer ✓
    Hi Kevo, thanks for you post and your efforts.

    I think I finally get your question: if you put the ratio symbol inside the Price Performance indicator, what are you really getting? As you point out, it is allowed, but is it meaningful?

    Unfortunately, it's not documented. It appears to be the difference in performance between the two symbols. So if $SPX is up 3% and IBM is down 15%, the result is -18%, although if you put all three on one chart, the math isn't exact. Not sure why that should be. It would nice to see the actual calculations.

    I always just assumed it was the ratio of the difference in performance, because of the ":" symbol. I never actually checked it out. My bad.

    Bottom line, it would nice if this indicator were included in the list of indicator explanations in Chart School.


  • ekwongekwong
    edited December 2014 Answer ✓
    Price Relative/Relative Strength

    Now somebody go help NT to find a scan.
  • markdmarkd mod
    edited December 2014 Answer ✓
    Hi ek, thanks for stopping by!

    Your link addresses putting the ratio pair in the "Price" indicator. It doesn't address putting a ratio pair in the "Price-Performance" indicator. I think Kevo is asking what that means, and I can't find an article like the one you linked to that explains that. I have always taken it to be the "per cent" version of price relative, like PPO is the normalized version of MACD, but maybe that's not right, and my math is too rusty to prove what I thought it does. What do you think?
  • ekwongekwong
    edited December 2014 Answer ✓
    Right. So Relative is comparing instrument A:instrument B, and Performance is rate of change of instrument A (see picture below).



    By combining both, you are trying to measure outperformance of instrument A, using the performance of instrument B over the same period of time as the baseline, as @Kevo explained above. See below.



    Now, having established that performance is rate of change, the calculation of outperformance is simply normalizing the comparing instrument with the baseline instrument. It can be done by taking the rate of change of the two performance numbers. ie. (1.0473-1.0347)/1.0347. Look at it the other way, the 1.22% is the additional percentage gain of the the baseline instrument (+3.47%), as @markd alluded.
  • markdmarkd mod
    Answer ✓
    Thanks, ek. I'll work with that.

Answers

  • Yes this is possible with the StockCharts scan engine, you just have to calculate the min. relative performance you want in advance. Here's a couple of articles on this subject.

    http://stockcharts.com/articles/scanning/2012/08/scanning-for-stocks-that-outperform-their-indexes.html

    http://stockcharts.com/articles/scanning/2013/12/modify-develop-and-test-a-custom-scan.html
  • Thank you kevo, markd, ekwong & gord. I read all you thoughtful comments, and they helped clarify long-standing questions i had about price relative & price performance. In my scan, i wanted to identify "overbought" by looking for extreme gains vs. $SPX, specifically extremes where price performance (or relative) are high vs its 20d MA. Am i making this too complicated? Should i forget about price relative to $SPX, and simply build a scan where price has advanced a very high "X%" percent over 20 days, and know those stocks also have a great price relative. I think so.
  • gordgord admin
    edited December 2014
    Hi @NottyTrader

    Lets see if we can get back to your original question. The scan engine can't look up data and insert it into the scan as a variable, but you can just look it up and insert it into the scan yourself, this is the technique I alluded to in my previous links to a couple of blog articles.

    Your scan question:

    ""Scan would show where Symbol "price performance" relative to S&P is > the price relative SMA

    Example: (symbol:$SPX) *1.03 is > (SMA,20,symbol:$SPX).""

    I assume you are looking for the symbol ratio to outperform the SMA20 ratio by 3%, so we just need to move the 1.03 to the other side of the equation and adjust the brackets a little.

    (symbol : $SPX) > SMA(20,symbol : $SPX) *1.03

    So now lets use a little algebra and change this formula into something we can use, ie: isolating the knowns from the unknowns.




    and [SMA(20, close ) / close < 0.96056 ]


    On a final note there is a small problem when using the $SPX index as the performance reference point. This index is not adjusted, whereas the stocks you are comparing to are adjusted for div's. I would suggest using the $SPXTR total return index which includes adjustment for div's.
  • Hello All. I appreciate this is a very old thread but I just need to do something very similar to what is discussed here:

    Effectively, I would like to have a scan which can tell me whether the price performance is above its weekly sma(50)


    The syntax mentioned above (symbol:$SPX) *1.03 > (SMA,20,symbol:$SPX) in this thread no longer works and neither do the links. I have been experimenting quite a bit and no matter what I tried, I am struggling to get it right:

    weekly close ('$SYMBOL:$NYA') > weekly SMA(50,close ('$SYMBOL:$NYA'))

    I would deeply appreciate if one of the knowledgeable people in this forum could point me in the right direction, please.

    Kind regards
Sign In or Register to comment.