taylor_o

vol_premia

taylor_o Telah dikemas kini   
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.
Nota Keluaran:
fixed the single-stock percentiles and changed a color
Nota Keluaran:
moved table to the middle so it doesn't interfere with other stuff on the screen
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?