Volatility Inverse Correlation CandleThis is an educational tool that can help you find direct or inverse relations between two assets.
In this case I am using VIX and SPX .
The way it works is the next one :
So I am looking at the current open value of VIX in comparison with the previous close ( if it either above or below) and after on the SPX I am looking into the history and see for example which type of candle we had in respect with the opening value from VIX .
So for example, lets imagine that today is monday, and the weekly open value from VIX was higher than previous friday close value. Now I am going to see with the inverse correlation , if based on this idea, the current weekly candle from SPX finished in a bear candle.
The same can be applied for the bearish situation, so if we had an open from VIX lower than previous close, we are looking to check the SPX bull candle accuracy.
At the same time, for a different type of calculation I have added an internal lookup into heikin ashi values.
If you have any questions please let me know !
VXN
Full Volatility Statistics and Forecast
This is a tool designed to translate the data from the expected volatility of different assets, such as for example VIX, which measures the volatility of SP500 index.
Once get the data from the volatility asset we want to measure(for this test I have used VIX), we are going to translate it the required timeframe expected move by dividing the initial value into :
252 = if we want to use the daily timeframe, since there are ~252 aproximative daily trading days
52 = if we want to use the weekly timeframe, since there 52 trading weeks in a year
12 = if we want to use the monthly timeframe, since there are 12 months in a year
For this example I have used 252 with the daily timeframe.
In this scenario, we can see that we had 5711 total cnadles which we analysed, and in this case, we had 942 crosses, where the daily movement ended up either above or below the channel made from the opening daily candle value + expected movement from the volatility, giving as a total of 16.5% of occurances that volatility was higher than expected, and in 83.5% of the times, we can see that the price stayed within our channel.
At the same time, we can see that we had 6 max losses in a row ( OUT) AND 95 max wins in a row (IN), and at the same time in those moments when the volatility crosses happen we had a 0.51% avg movements when the top crossed happened, and 0.67% avg movements when the bot happened.
Lastly on the second part of the panel, we had E which means the expected movement of today, for example it has 61.056$ , so lets say price opened on 4083, our top is 4083 + 61 and our bot is 4083 - 61 ( giving us the daily channel). At continuation we can see that overall the avg bull candle os 0.714% and avg bear candle was 0.805% .
I hope this tool will help you with your future analysis and trades !
If you have any questions please let me know !
VIX Strategy : Risk-ON, Risk-OFF
VRatio is the ratio of VIX3M and VIX. This ratio rises above 1.1; in a bear market, it decreases and goes below 1. VRatio=VIX3M/VIX. More details in Part 2.
VRatio > 1: Risk-On signal
Contango is the ratio of VX2 (first back-month contract) and VX1 (front-month contract) minus one. In a bull market, this indicator rises above 5%’ in a downtrend market, this indicator goes below -5%. More details in Part 2.
Contango > -5%: Risk-On signal
Contango Roll is the ratio of VX2 first back-month contract) and the VIX minus one. In a bull market, this indicator rises above 10%’ in a downtrend market, this indicator goes below -10%. More details in Part 2.
Contango Roll > 10%: Risk-On signal
Volatility Risk Premium (VRP) compares the implied volatility to the recent realized volatility; it attempts to quantify how much “extra” premium (in volatility term) S&P500 option sellers are charging investors for the protection of their portfolio. It can be seen as an insurance premium. A simple way to compute the VRP is VRP= VIX -HV10 where HV10 is the 10-day historical volatility of S&P500. Some people also look at the 5-day moving average of the VRP to smooth this indicator.
VRP > 0: Risk-On signal
Fast Volatility Risk Premium (FVRP) is a variant of the VRP. FVRP=EMA(VIX,7)-HV5 where HV5 the 5-day historical volatility of S&P500.
FVRP > 0: Risk-On signal
Volatility Momentum compares today’s VIX to last 50 days. It has, therefore, quite a bit of lag but it is a useful measure when combined with other indicators. Volatility Momentum=SMA(VIX,50) -VIX.
Volatility Momentum > 0: Risk-On signal
VIX Mean Reversion looks at today’s VIX compared to certain thresholds. We avoid investing in the S&P500 when the VIX is too high (above 20) or too low (below 12).
VIX Mean Reversion > 12 and VIX Mean Reversion < 20: Risk-On signal
VIX3M Mean Reversion works the same way as VIX Mean Reversion.
VIX3M Mean Reversion > 12 and VIX3M Mean Reversion < 20: Risk-On signal
VXN (NQ100 VIX) Implied Move Bands for NQ futures.A spin-off of my similar script for ES futures. This script uses the VXN Index instead of the VIX, which represents the 30-day implied volatility of Nasdaq-100 options and then uses that value to plot bands on the chart, helping traders identify price extremes as identified by the options market. Users can modify the moving average, bands multiplier, and number of lookback days used in the calculation to suit their trading style.
Nasdaq VXN Volatility Warning IndicatorToday I am sharing with the community a volatility indicator that uses the Nasdaq VXN Volatility Index to help you or your algorithms avoid black swan events. This is a similar the indicator I published last week that uses the SP500 VIX, but this indicator uses the Nasdaq VXN and can help inform strategies on the Nasdaq index or Nasdaq derivative instruments.
Variance is most commonly used in statistics to derive standard deviation (with its square root). It does have another practical application, and that is to identify outliers in a sample of data. Variance is defined as the squared difference between a value and its mean. Calculating that squared difference means that the farther away the value is from the mean, the more the variance will grow (exponentially). This exponential difference makes outliers in the variance data more apparent.
Why does this matter?
There are assets or indices that exist in the stock market that might make us adjust our trading strategy if they are behaving in an unusual way. In some instances, we can use variance to identify that behavior and inform our strategy.
Is that really possible?
Let’s look at the relationship between VXN and the Nasdaq100 as an example. If you trade a Nasdaq index with a mean reversion strategy or algorithm, you know that they typically do best in times of volatility . These strategies essentially attempt to “call bottom” on a pullback. Their downside is that sometimes a pullback turns into a regime change, or a black swan event. The other downside is that there is no logical tight stop that actually increases their performance, so when they lose they tend to lose big.
So that begs the question, how might one quantitatively identify if this dip could turn into a regime change or black swan event?
The Nasdaq Volatility Index ( VXN ) uses options data to identify, on a large scale, what investors overall expect the market to do in the near future. The Volatility Index spikes in times of uncertainty and when investors expect the market to go down. However, during a black swan event, historically the VXN has spiked a lot harder. We can use variance here to identify if a spike in the VXN exceeds our threshold for a normal market pullback, and potentially avoid entering trades for a period of time (I.e. maybe we don’t buy that dip).
Does this actually work?
In backtesting, this cut the drawdown of my index reversion strategies in half. It also cuts out some good trades (because high investor fear isn’t always indicative of a regime change or black swan event). But, I’ll happily lose out on some good trades in exchange for half the drawdown. Lets look at some examples of periods of time that trades could have been avoided using this strategy/indicator:
Example 1 – With the Volatility Warning Indicator, the mean reversion strategy could have avoided repeatedly buying this pullback that led to this asset losing over 75% of its value:
Example 2 - June 2018 to June 2019 - With the Volatility Warning Indicator, the drawdown during this period reduces from 22% to 11%, and the overall returns increase from -8% to +3%
How do you use this indicator?
This indicator determines the variance of VXN against a long term mean. If the variance of the VXN spikes over an input threshold, the indicator goes up. The indicator will remain up for a defined period of bars/time after the variance returns below the threshold. I have included default values I’ve found to be significant for a short-term mean-reversion strategy, but your inputs might depend on your risk tolerance and strategy time-horizon. The default values are for 1hr VXN data/charts. It will pull in variance data for the VXN regardless of which chart the indicator is applied to.
Disclaimer: Open-source scripts I publish in the community are largely meant to spark ideas or be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
The dispersion of volatility indicesThe script is my implementation of "Forecasting a Volatility Tsunami" by Andrew Thrasher (Thrasher Analytics). You can find the paper here: www.researchgate.net
I've changed a bit the approach - instead of two volatility indices (VIX & VVIX), I used two more: VXN and VXD. Additionally, I average the percentiles, but there is an option to swtich it to the original approach.