taylor_o

vol_premia

taylor_o Uppdaterad   
This script shows the volatility risk premium for several instruments. The premium is simply "IV30 - RV20". Although Tradingview doesn't provide options prices, CBOE publishes 30-day implied volatilities for many instruments (most of which are VIX variations). CBOE calculates these in a standard way, weighting at- and out-of-the-money IVs for options that expire in 30 days, on average. For realized volatility, I used the standard deviation of log returns. Since there are twenty trading periods in 30 calendar days, IV30 can be compared to RV20. The "premium" is the difference, which reflects market participants' expectation for how much upcoming volatility will over- or under-shoot recent volatility.

The script loads pretty slow since there are lots of symbols, so feel free to delete the ones you don't care about. Hopefully the code is straightforward enough. I won't list the meaning of every symbols here, since I might change them later, but you can type them into tradingview for data, and read about their volatility index on CBOE's website. Some of the more well-known ones are:

ES: S&P futures, which I prefer to the SPX index). Its implied volatility is VIX.
USO: the oil ETF representing WTI future prices. Its IV is OVX.
GDX: the gold miner's ETF, which is usually more volatile than gold. Its IV is VXGDX.
FXI: a china ETF, whose volatility is VXFXI.

And so on. In addition to the premium, the "percentile" column shows where this premium ranks among the previous 252 trading days. 100 = the highest premium, 0 = the lowest premium.
Versionsinformation:
fixed the single-stock percentiles and changed a color
Versionsinformation:
moved table to the middle so it doesn't interfere with other stuff on the screen
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?