OPEN-SOURCE SCRIPT

vix_roll_yield

Shows the roll yield of the VX futures, which is the ratio of a continuously weighted average of the front two months to the VIX. The VX (VIX futures) contract expires on the third Tuesday of each month. On the next trading day, the front month will have full weighting, and the second month will have no weight. On the expiration day, the back month will have full weighting and the front month will have no weight. In between, the weight gradually shifts.

This weighted average is similar to the SPVIXSTR index that UVXY and several other funds track. When the average is below the VIX, the indicator is negative, and the front month contract will tend to gain value relatively more rapidly than the back month as it converges upward to the VIX spot price. Because funds whose NAV is tied up in VX contracts continuously roll from the (typically cheaper) front month to the back, in situations where the front month is more expensive than usual--or even more expensive than the back month--these products may have a "tailwind". In this case, they are selling expensive front month contracts to purchase cheap back month contracts.

Ordinarily, VIX funds have a "headwind." The roll yield is positive, the front month is cheap, and the back month is expensive. Day by day the funds sell cheap front month contracts and buy expensive back month contracts, which, in turn and over time, become the front month and converge with the VIX, losing value rapidly. This is a brief explanation about the decay of these products.
futuresROLLUVXYVIX CBOE Volatility IndexVolatilityVXXyield

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer