Create put/call ratio for individual stock?

YungTraderFromMontana

Well-known member
I'm interested on the connection between P/C ratio and price movement but to analyze it I would need a lower study that plots the P/C ratio. Nothing fancy, just all puts/all calls, I don't care about the strikes. It seems like it would be easy but I've never come across it. Does anyone know of an indicator like this or how to make one? I feel it would be a cool thing to backtest and maybe add to a strategy. If I could get this I'd be happy to create an indicator using it for the community.
 

Pensar

Active member
VIP
@YungTraderFromMontana I saw your idea and figured I'd try it, check if this fits what you're looking for. :)

Code:
#$PCALL_Indicator
#Pensar
#06/16/2020
#$PCALL below 0.75 - high bullish market sentiment
#$PCALL between 0.75-1.00 - neutral market sentiment
#$PCALL above 1.00  - high bearish market sentiment

declare lower;

input labels = yes;

plot pcall = close("$PCALL");
     pcall.SetLineWeight(1);
     pcall.SetPaintingStrategy(paintingstrategy.line_vs_points);
     pcall.AssignValueColor(if pcall > 1.0 then color.red
                            else if pcall > 0.75 then color.gray
                            else color.green);

plot high_line = 1.0;
     high_line.SetDefaultColor(color.red);

plot mid_line = 0.75;
     mid_line.SetPaintingStrategy(paintingstrategy.dashes);
     mid_line.SetDefaultColor(color.gray);

plot low_line = 0.50;
     low_line.SetDefaultColor(color.green);

AddLabel(Labels,"$PCALL: " + close("$PCALL"), Color.gray);
AddLabel(Labels, "Sentiment: " + (if pcall > 1.0
         then "Highly Bearish"
         else if pcall > 0.75 then "Neutral"
         else "Highly Bullish"),
         if pcall > 1.0 then color.red
         else if pcall > 0.75 then color.gray
         else color.green);

#end code
 

YungTraderFromMontana

Well-known member
@Pensar Yo this is amazing, a whole new world of analysis has opened up.

Edit: Actually this isn't what I wanted, this give p/c ratio of all options on the market. I need it for individual stocks. Would you know how to do that?
 
Last edited by a moderator:

YungTraderFromMontana

Well-known member
I'm interested on the connection between P/C ratio and price movement but to analyze it I would need a lower study that plots the P/C ratio. Nothing fancy, just all puts/all calls, I don't care about the strikes. It seems like it would be easy but I've never come across it. Does anyone know of an indicator like this or how to make one? I feel it would be a cool thing to backtest and maybe add to a strategy. If I could get this I'd be happy to create an indicator using it for the community.
@BenTen can you repost my question as a thread because the answer is not in this thread and the focus is on current p/c ration not past p/c ratio for analysis. No indicator here shows me the raw put/call indicator for any stock as a lower plot, Tomsk's versions show the P/C of a chosen strike which won't be helpful for backtesting.
 

Pensar

Active member
VIP
Oh, I understand what you want now. That is likely difficult to get. As you mentioned, Tomsk posted in this thread the code to get the ATM put/call ratio of a particular stock, and that probably would have to be repeated multiple times for each individual strike. :( I have never looked very deep into coding it.
 

BenTen

Administrative
Staff
VIP
@YungTraderFromMontana Your original title and question were related to the general put/call ratio. That is why it was moved there. Next time, please be more specific about your request.

Now that we understood what you wanted, these two threads may be useful:
Understand how the put/call ratio is being calculated, then apply that calculation to all the strikes within the individual ticker.
 

Similar threads

Top