# Implied Monthly Range from VIX

The VIX is a measure of the 30-day volatility of the SPX and is a popular measure of risk. What often trips people up is that it is a measure of the 30-day volatility but it is expressed as an annualized number. The calculation is based on the volatility of options and way beyond the scope of this post. Technically when we think of all the possible ranges, it represents the first standard deviation. Meaning that there is a 68% chance that we will be within that range.

It can be useful to calculate the expected range so that we know if our expected targets have a statistical basis. There are two ways we can do this. The first is to add a Show View to the S&P500 and set the following script:

```v1 = GETDATA(CODE=VIX:CBOEI);
c1 = CLOSE(v1)/100;
f1 = sqrt(21/252);
CLOSE() * c1 * f1```

This script is getting the VIX data file (you’ll need the CBOE data group) and then converts the VIX value to a decimal by dividing by 100. Finally the volatility is converted from Yearly (252) to Monthly (21).

Note: there are 21 trading days in a month and 21 x 12 = 252 for 252 trading days in a year. Since the VIX is the monthly volatility, we divide back to daily and then convert to yearly.

You can see this represented in the bottom panel on the chart below.

What is even better is to take that script and adjust it so that it creates a range on our chart. Here is the script for that one - just use a Show Plot and reduce the tool transparency.

```v1 = GETDATA(CODE=VIX:CBOEI);
c1 = CLOSE(v1)/100;
f1 = sqrt(21/252);
vol1 = CLOSE() * c1 * f1;
SHADE(CLOSE() + vol1, CLOSE() - vol1, DOWNCOLOUR=Gold, UPCOLOUR=Gold)```

Here is the chart.

Now when I look at my Fibonacci Retracements, I can see that I have very little chance of hitting the 38.2 level within the next 30 days.

What if you want to do another security that does not have VIX? Just use Historical Volatility instead. It is backwards looking rather then forward looking, but still gives you a good idea if targets are achievable within the time frame you are interested in.

If you want to learn more advanced Technical Analysis Techniques, consider the CMT courses we teach at http://learn.optuma.com

I got the first code to work ,but the second code to use on the chart comes back as invalid. Any help will be much appreciated.

Hi,

When copying scripts from a website sometimes invalid characters can come in. Minus symbols (-) in particular can paste incorrectly. You can try pasting it into notepad first where these special characters are stripped out, or where a - is being used, delete it, and manually type it in to replace it.

That should fix the issue.

That’s great. Thank you!