JP Morgan VIX Buy Signal For ThinkOrSwim

AndrewPnF

New member
Author states: The VIX (Cboe Volatility Index) is a widely-followed measure of stock market volatility.

JPMorgan strategists, led by Mislav Matejka, have developed an indicator based on the VIX that could be used to trade the markets more effectively.

The concept is simple:
A buy signal is generated when the VIX increases by more than 50% of its 1-month moving average.
The VIX Buy Signal indicator has been triggered more than 21 times during the past 30 years.

Every single time, the S&P 500 Index increased by an average of 9% over the ensuing six months.
XZtSFlK.png


Thought I'd share. On a different thinkscript resource they discussed this VIX strategy that was "100%" accurate at the time. I don't know if it's still true but....

https://thinkscript101.com/vix-buy-signal-indicator-for-thinkorswim/

It did look interesting though. So I added it to my custom indicators and then modified it a bit to show up on my charts. I copied the bubble structure from the Highest Volume of the Year indicator by XeoNoX via usethinkscript.com and added the fabulous Bubble Mover code. It does look like a very good way to show when the VIX hits inflection.

Code:
####
# Indicator Name: JPMorgan’s VIX Buy Signal
# Description: A bullish indicator from JPMorgan strategists
# Version: 1.0.0
# Developer: Melvin C.
# URL: https://thinkscript101.com/vix-buy-signal-indicator-for-thinkorswim/
####
 
declare lower;
def vix_data = close("VIX");
plot vix_average = (vix_data / average(vix_data, 30));
plot signal_line = 1.5;
vix_average.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

# END original VIX_JPMorganBuySignal_Lower code

# below is Stuff I added to to show bubbles and labels (if desired) and to allow user to ONLY show the histogram lines if the condition is met by making ONLY vix_average2 show and marking the rest to no show in the settings.  I'm not an expert thinkscript coder so most of this is cobbled together from other snippets of code I copied and pasted and then manipulated.

def vix_average1 = (if vix_average > 1.5 then vix_average else 0);
plot vix_average2 = (vix_average1 );
addlabel(yes,if vix_average >= signal_line then "JPMorgan VixBuy" else "",color.black);
vix_average2.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

input labels = yes;
def VixBubble = vix_average >= signal_line;
def yearhighvol = HighestAll(if GetLastYear() == GetYear() and !IsNaN(close) and !IsNaN(close[-1]) then VixBubble else 0);

def himonth = if VixBubble==1 then getmonth() else himonth[1];
def hiday =   if VixBubble==1 then getDayOfMonth(getYYYYMMDD()) else hiday[1];
def hiyear  = if VixBubble==1 then getyear() else hiyear[1];

AddLabel (labels, "VIX_JPM BuySig : " + himonth + "/" + hiday + "/" + hiyear, Color.black);

def BubbleHighest = VixBubble==yearhighvol;
input bubblemoversideways = -1;
def b  = bubblemoversideways;
def b1 = b + 1;
input bubblemoverupdown   = 0.50;

AddChartBubble(BubbleHighest ,VixBubble * bubblemoverupdown, "JPM " +himonth+" " + hiday,  Color.YELLOW, yes);
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

This is similar to a strategy a friend taught me about ten years ago.

His stategy is to apply a 10 day simple moving average to the VIX. An alert is sent when the VIX exceeds the 10 SMA by at least 8 points. Once you get the alert, you watch the VIX. The indices are considered a buy once the VIX reverses and begins moving down. He preferred to wait for the VIX to drop below the 10 SMA.

There was a website that created a very interesting buy signal that worked similarly. I tried but could never duplicate it. If I can dig up the link, I may post it in the questions section.
 
I like your volume study, and have seen similar in other places. How do we get multiple volume studies on one chart? I only have the basic volume profile. Thank you!

The default setting "time per profile" is set to Chart by default but can be set to other timeframes as depicted in the image below... My example is from the VolumeProfile indicator that comes in TOS... You also need to change the "on expansion" setting to No...

1734635015049.png



1734634813460.png
 
Last edited:
@Dharmakaya

In answer to your question, you overlay the studies in the same section and insure you are able to see them each by manipulating their position within the section.
 
Author states: The VIX (Cboe Volatility Index) is a widely-followed measure of stock market volatility.

JPMorgan strategists, led by Mislav Matejka, have developed an indicator based on the VIX that could be used to trade the markets more effectively.

The concept is simple:

The VIX Buy Signal indicator has been triggered more than 21 times during the past 30 years.

Every single time, the S&P 500 Index increased by an average of 9% over the ensuing six months.
XZtSFlK.png


Thought I'd share. On a different thinkscript resource they discussed this VIX strategy that was "100%" accurate at the time. I don't know if it's still true but....

https://thinkscript101.com/vix-buy-signal-indicator-for-thinkorswim/

It did look interesting though. So I added it to my custom indicators and then modified it a bit to show up on my charts. I copied the bubble structure from the Highest Volume of the Year indicator by XeoNoX via usethinkscript.com and added the fabulous Bubble Mover code. It does look like a very good way to show when the VIX hits inflection.

Code:
####
# Indicator Name: JPMorgan’s VIX Buy Signal
# Description: A bullish indicator from JPMorgan strategists
# Version: 1.0.0
# Developer: Melvin C.
# URL: https://thinkscript101.com/vix-buy-signal-indicator-for-thinkorswim/
####
 
declare lower;
def vix_data = close("VIX");
plot vix_average = (vix_data / average(vix_data, 30));
plot signal_line = 1.5;
vix_average.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

# END original VIX_JPMorganBuySignal_Lower code

# below is Stuff I added to to show bubbles and labels (if desired) and to allow user to ONLY show the histogram lines if the condition is met by making ONLY vix_average2 show and marking the rest to no show in the settings.  I'm not an expert thinkscript coder so most of this is cobbled together from other snippets of code I copied and pasted and then manipulated.

def vix_average1 = (if vix_average > 1.5 then vix_average else 0);
plot vix_average2 = (vix_average1 );
addlabel(yes,if vix_average >= signal_line then "JPMorgan VixBuy" else "",color.black);
vix_average2.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

input labels = yes;
def VixBubble = vix_average >= signal_line;
def yearhighvol = HighestAll(if GetLastYear() == GetYear() and !IsNaN(close) and !IsNaN(close[-1]) then VixBubble else 0);

def himonth = if VixBubble==1 then getmonth() else himonth[1];
def hiday =   if VixBubble==1 then getDayOfMonth(getYYYYMMDD()) else hiday[1];
def hiyear  = if VixBubble==1 then getyear() else hiyear[1];

AddLabel (labels, "VIX_JPM BuySig : " + himonth + "/" + hiday + "/" + hiyear, Color.black);

def BubbleHighest = VixBubble==yearhighvol;
input bubblemoversideways = -1;
def b  = bubblemoversideways;
def b1 = b + 1;
input bubblemoverupdown   = 0.50;

AddChartBubble(BubbleHighest ,VixBubble * bubblemoverupdown, "JPM " +himonth+" " + hiday,  Color.YELLOW, yes);
Can you add an alert?
 
Along similar lines tothe original post, there was an online conference recently where Erin Swenlin presented "Identifying Key Market Pivot Points Using Climax analysis. She presented several ideas that some on here may find value. The video is on youtube.

One idea is to take the ratio between NYSE up volume and divide it by down volume. She takes the inverse of that and plots it on a chart. When that ratio exceeds key levels, it can signal a reversal. Her approach uses two separate charts. I took this approach and created one indicator and use it to apply arrows to price chart when the ratios exceed key levels. The key level values are adjustable. The key levels is a parameter, so you should be able to set alerts for when the VIX exceeds the key level threshold.

Swenlin also plots the inverse of the VIX and applies Bollinger Bands to it, and looks for periods when the VIX spikes outside the BBs. I plotted this in TOS. When the VIX exceeds the Bollinger Bands, it prints an arrow on the price chart. I found that you can reduce the number of signals by increasing the Bollinger Band setting on the VIX to something greater than 2.0. I just created these charts this weekend, so I'm still playing with them. A setting of 3.0 for the BBs reduces the number of signals significantly.

Here is the link to the video:

For full disclosure, I can barely write thinkscript code. If anybody wants these, let me know and I will post them.
 

Attachments

  • Swenlin_1.png
    Swenlin_1.png
    319.9 KB · Views: 42
  • Swenlin_2.png
    Swenlin_2.png
    327.1 KB · Views: 43
Here is the code for the extreme volume days:

I use the same study for top and bottom. I go into the settings and turn off the plot for the histogram and reference lines when I use it as a bottom study. I only use the up and down arrows when I use it as a top study.

I've seen where people on this board will make a different indicator for top and bottom studies. The code is the same but the painting and formatting is different. Is it more efficient to do that than have one study used both top and bottom?

Code:
# This thinkscript can be used as both an upper and lower study.
# For lower study, turn off the Upsignal and Downsignal in the settings window.  This
# will only plot the histogram.

# For upper studies, turn off the NYSE_Up_Ratio and NYSE_Down_ratio in the
# studies window.  Turn on the extreme_up and extreme_down arrows.

# The green up bars are the ratio of the NYSE up volume divided by NYSE down volume.
# The red lines are the ratio of the NYSE down volume divided by the NYSE up volume.
# When up volume is very high compared to down volume, markets are seeing extreme optimism.
# When the down volume ratio is very high, markets are extremely pessimistic.
# The refline is an arbitrary value.  The minimum value is set at 3,
# but fewer signals are triggered at higher levels.

input refline_up = 3;
input refline_down = -3;
def ADV = close(Symbol = "$UVOL", Period = "DAY");
#//Count of Unchanged Issues
def DEC = close(Symbol = "$DVOL", Period = "DAY");

plot NYSE_Up_ratio = ADV / DEC;
plot NYSE_down_ratio = - DEC / ADV;



plot extreme_up = refline_up;
plot extreme_down = refline_down;

# This next section of code plots the up and down signals on the price chart.

plot UpSignal = NYSE_Up_ratio crosses above refline_up;
plot DownSignal = NYSE_down_ratio crosses below refline_down;

NYSE_Up_ratio.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
NYSE_Up_ratio.SetLineWeight(5);
NYSE_Up_ratio.SetDefaultColor(Color.DARK_GREEN);
NYSE_down_ratio.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
NYSE_down_ratio.SetLineWeight(5);
NYSE_down_ratio.SetDefaultColor(Color.RED);


Upsignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Upsignal.SetDefaultColor(color.RED) ;
Upsignal.SetLineWeight(3);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(color.DARK_GREEN) ;
DownSignal.SetLineWeight(3);
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
346 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top