TradingView
Steversteves
22 Apr 2023 pukul 23.52

Put to Call Ratio Correlation 

Invesco QQQ Trust, Series 1NASDAQ

Huraian

Hello!

Excited to share this with the community!
This is actually a very simple indicator but actually usurpingly helpful, especially for those who trade indices such as SPX, IWM, QQQ, etc.

Before I get into the indicator itself, let me explain to you its development.
I have been interested in the use of option data to detect sentiment and potential reversals in the market. However, I found option data on its own is full of noise. Its very difficult if not impossible for a trader to make their own subjective assessment about how option data is reflecting market sentiment.
Generally speaking, put to call ratios generally range between 0.8 to 1.1 on average. Unless there is a dramatic pump in calls or puts causing an aggressive spike up to over this range, or fall below this range, its really difficult to make the subjective assessment about what is happening.

So what I thought about trying to do was, instead of looking directly at put to call ratio, why not see what happens when you perform a correlation analysis of the PTC ratio to the underlying stock.

So I tried this in pinescript, pulling for Tradingview's ticker PCC (Total Equity Put to Call Ratio) and using the ta.correlation function against whichever ticker I was looking at.

I played around with this idea a bit, pulled the data into excel and from this I found something interesting. When there is a very significant negative or positive correlation between PTC ratio and price movement, we see a reversal impending. In fact, a significant negative or positive correlation (defined as a R value of 0.8 or higher or -0.8 or lower) corresponded to a stock reversal about 92% of the time when data was pulled on a 5 minute timeframe on SPY.

But wait, what is a correlation?
If you are not already familiar, a correlation is simply a statistical relationship. It is defined with a Pearson R correlation value which ranges from 0 (no correlation) to 1 (significant positive correlation) and 0 to -1 (significant negative correlation).

So what does positive vs negative mean?
A significant positive correlation means the correlation is moving the same as the underlying. In the case of this indicator, if there is a significant positive correlation could mean the stock price is climbing at the same time as the PTC ratio.
Inversely, it could mean the stock price is falling as well as the PTC ratio.

A significant negative correlation means the correlation is moving in the opposite direction. So in this case, if the stock price is climbing and the PTC ratio is falling proportionately, we would see a significant negative correlation.

So how does this work in real life?
To answer this, let's get into the actual indicator!



In the image above, you will see the arrow pointing to an area of significant POSITIVE correlation.
The indicator will paint the bars on the actual chart purple (customizable of course) to signify this is an area of significant correlation.

So, in the above example this means that the PTC ratio is increase proportionately to the increase in the stock price in the SAME direction (Puts are going up proportionately to the stock price). Thus, we can make the assumption that the underlying sentiment is overwhelmingly BEARISH. Why? Because option trading activity is significantly proportionate to stock movement, meaning that there is consensus among the options being traded and the movement of the market itself.

And in the above example we will see, the stock does indeed end up selling:



In this case, IWM fell roughly 1 point from where there was bearish consensus in the market.

Let's use this same trading day and same example to show the inverse:



You will see a little bit later, a significant NEGATIVE correlation developed.
In this case identified, the stock wise RISING and the PTC ratio was FALLING.
This means that Puts were not being bought up as much as calls and the sentiment had shifted to bullish .



And from that point, IWM ended up going up an additional 0.75 points from where there was a significant INVERSE correlation.


So you can see that it is helpful for identifying reversals. But what is also can be used for is identifying areas of LOW conviction. Meaning, areas where there really is no relationship between option activity and stock movement. Let's take spy on the 1 hour timeframe for this example:



You can see in the above example there really is no consensus in the option trading activity with the overarching sentiment. The price action is choppy and so too is option trading activity. Option traders are not pushing too far in one direction or the other. We can also see the lack of conviction in the option trading activity by looking at the correlation SMA (the white line).

When a ticker is experiencing volatile and good movement up and down, the SMA will generally trade to the top of the correlation range (roughly + 1.0) and then make a move down to the bottom (roughly - 1.0), see the example below:



When the SMA is not moving much and accumulating around the centerline, it generally means a lot of indecision.


Additional Indicator Information:

As I have said, the indicator is very simple. It pulls the data from the ticker PCC and runs a correlation assessment against whichever ticker you are on.
PCC pulls averaged data from all equities within the market and is not limited to a single equity. As such, its helpful to use this with indices such as SPY, IWM and QQQ, but I have had success with using it on individual tickers such as NVDA and AMD.

The correlation length is defaulted to 14. You can modify it if you wish, but I do recommend leaving it at this as the default and the testing I have done with this have all been on the 14 correlation length.

You can chose to smooth the SMA over whichever length of period you wish as well.

When the indicator is approaching a significant negative or positive relationship, you will see the indicator flash red in the upper or lower band to signify the relationship. As well, the chart will change the bar colour to purple:



Everything else is pretty straight forward.

Let me know your questions/comments or suggestions around the indicator and its applications.

As always, no indicator is meant to provide a single, reliable strategy to your trading regimen and no indicator or group of indicators should be relied on solely. Be sure to do your own analysis and assessments of the stock prior to taking any trades.


Safe trades everyone!





Nota Keluaran

Revised update. Update includes:
1. Cosmetic changes;
2. Ability to smooth the plots;
3. Ability to toggle on and off the bar color change on reversals
Komen
r4christc
I look forward to the tutorial and please, when you do, give examples of all four scenarios, that would be very helpful... also explaining the colors (red green purple)
Thank you!
learncsk
it is not working in BankNifty, Nifty50, in MCX, can you help me on it please.
Steversteves
@learncsk, Unfortunately this pulls data on NYSE stocks and indices, you cannot use it in foreign markets.
I can look into if Tradingview provides foreign market PTCR data and look to incorporate a toggle. But just checking, I don't think this data is available on Tradingview at this time, but I will double check.
SquishTrade
This indicator looks potentially very useful! I applaud the reasoning and effort you put into this. Do you use this on TFs higher than intraday? Are you still finding it useful even with 0DTE having exploded to more than 50% of options volume during many cash sessions?

Thanks again for sharing this with the community. Best to you.
Steversteves
@SquishTrade, Hey! Thank you for the feedback and questions :-).
Yes! I use this on larger timeframes as well, but it is precisely people's overuse of 0DTES I think that makes this particularly helpful on the shorter timeframe.
But in regards to the larger timeframe, I do use it, but I have other tools that I use more frequently. Like I have a little bot that scans all available option activity on tickers that I follow and alerts me of the date, strike and volume with the highest cumulative calls and puts as well as a breakdown of put to call for those dates and strikes. I tend to use that more for larger timeframe planning, but I do use this as well on the 1 hour because it helps identify key areas of put accumulation.
One thing I discovered using this, is the market tends to revisit and find support on these high areas of put/call accumulation, which is interesting. So one thing I am in the works on is a Volume Session Profile for options. Would be really interesting to see the breakdown in a VSP way against the charts.

Thanks for the questions and comments! I like your content as well :-).
SquishTrade
@Steversteves, Thanks for your response! Your perspective on 0DTE flows' effect on this indicator makes sense. Absent larger catalysts and longer-dated options flows on major indices (SPX / SPY / QQQ), it does seem that 0DTE flows have an outsized effect on direction intraday (with an overall mean-reverting quality especially when uncertainty about macro, Fed policy, rates, USD, etc., remain high). I'm definitely no expert on this, but I enjoy learning about it and trying to stay up to speed on this newer development.
swaroopplss
this is very nice, i am not getting arrows either way, can you help me with it? please ,
Steversteves
@swaroopplss, Hey, thank you! And oh, if you are referring to the picture, the arrows don't show up on the indicator, that was just me plotting for demonstration purposes. I just have it change colour. I suppose I could add the arrow functionality if it is something that you may seem useful as a secondary trigger.
DocKenneth
@Steversteves Question: In your last chart, it looks like positive correlation, but the price goes up for several hours? It's difficult for me to see the colors on the chart, so maybe I am missing something. From what you mentioned early on, the correlation works well with 5-minute chart on SPY? As always, thanks for all you do!
Steversteves
@DocKenneth, Good question and something I forgot to address in the indicator description. Positive correlation can be both bullish or bearish. Same with negative. You have to do the subjective assessment of where the correlation is and what it means. I will actually post a tutorial to sort of explain it a bit better.
And yeah it works really well on the 5. I have done most of the testing on the 5 min chart on SPY and IWM.
Lebih