Simple ThinkScript for observing SPX term fear

garyw

Active member
Gold Member
A few years back, I wrote at thinkscript "vx_ref" to allow visualization of /VX Term structure contango, similar to what is available on VIXCENTRAL. This is great if that is precisely what you want, or you are trading products like VXX or UVXY, which are based on the VX Futures terms. However, if you are not trading those products, then that may be a poor tool to properly quantify the volatility (IV) changes in SPX. The impact of the expiring futures contracts is unwelcome information if you are trading SPX. Since elevated fear levels show up in the term structure, this may be useful (as opposed to observing 30-day IV in isolation) for gauging Fear (volatility).
I wrote a simple script to reflect the Ratio of VIX & VIX3M {like a Backwardation percentage) as an indication of Fear in SPX. The script has a "smooth line" for "highlevel view", and dots, to represent the Realtime difference, for the detail oriented of us.
Similar to the "vx_ref" study, two threshold inputs are available to help clarify ranges of importance to you. --The default settings are 0 and -10 (for Backwardation, and 10% from Backwardation).

Here is chart with it and the vx_ref under SPX to show it has similar usefulness as the 2 front month VX futures difference, but without the futures roll disruption each month. I am also attaching the thinkscript for those who may be interested.
Improvement recommendations solicited. -- I continue to search for better ways to quantify SPX IV.

1632860526696.png
 

Attachments

Last edited:
Improvement recommendations solicited. -- I continue to search for better ways to quantify SPX IV.

do oyu think there's any insight in taking at/near-the-money iv from all spx expirations and monitoring it in real-time? it likely will be somewhat noisy so it might need a smoothing function. i grabbed the atm iv today, after-hours but the data is questionable. it does show an elevated iv for the first several expirations and trailing exponentially before rising again for distant expirations. might be worth investigating.
 
Jim:
I do currently calculate, then capture ATM IV for all expiry's in real time (during market hours). The data tracks similarly to what you see on VIXCENTRAL with the terms. (VIX Central use to also allow inclusion of the /VX Weeklies, which I no longer observe -- perhaps I forgot how ).
I don't have insight on how to render the real-time atm iv of all terms --Each time I have considered such a thing in the past, I have difficulty in nailing down what I wish to accomplish -- perhaps you have suggestions.

If I TOS had access to a VIX2M, I would use that instead of the VIX3M, but I think the 3M (90day) is probably adequate.

The near term IV (say 14 days and under) seems to be a slightly different beast, so mixing short term IV with longer term (30 days and up) may produce more confusion than clarity, IMHO.
 
visualization of the data is the key. i thought maybe a scrolling surface plot of the several near-term expiration iv. that would be challenging to program, but as an alternative, possibly just a family of scrolling lines would work, and monitor the relationship over time. the question is whether there's more information in that than just watching the vix.
 
Agree re visualization. It is much easier for me to analyze nicely graphed data than going through columns of numbers. This not universal and some do prefer numbers. Actually I use both - graphs for overview and numbers for details.
Re VIX question. I think it depends what you use it for. VIX in fine if you talk about markets in general terms, for example if you trading some long term portfolios. For active traders, imo, vix does not carry needed info, and looking at the whole surface gives you much, much more details about what is going on.
 
Top
Contact Us