OPEN-SOURCE SCRIPT

TASC 2022.08 Trading The Fear Index

█ OVERVIEW

TASC's August 2022 edition of Traders' Tips includes an article by Markos Katsanos titled "Trading The Fear Index". This script implements a trading strategy called the “daily long/short trading system for ​volatility ETFs” presented in this article.

█ CONCEPTS

This long-term strategy aims to capitalize on stock market volatility by using exchange-traded funds (ETFs or ETNs) linked to the VIX index.

The strategy rules (see below) are based on a combination of the movement of the ​Cboe VIX index, the readings of the stochastic oscillator applied to the SPY ​ETF relative to the ​​VIX, and a custom indicator presented in the article and called the correlation trend. Thus, they are not based on the price movement of the traded ​ETF itself, but rather on the movement of the ​VIX and of the S&P 500 index. This allows the strategy to capture most of the spikes in ​volatility while profiting from the long-term time decay of the traded ETFs.

█ STRATEGY RULES

Long rules
  • Rising ​volatility: The ​VIX should rise by more than 50% in the last 6 days.
  • Trend: The correlation trend of the ​VIX should be 0.8 or higher and also higher than yesterday's value.
  • ​VIX-​SPY relative position: The 25-day and 10-day ​VIX ​stochastics should be above the 25-day and 10-day ​SPY ​stochastics respectively. In addition, the 10-day ​stochastic of the ​VIX should be above its yesterday's value.

Long positions are closed if the 10-day ​stochastic of the ​SPY rises above the 10-day ​​stochastic of the ​VIX or falls below the yesterday's value.

Short rules
  • Declining ​volatility: The ​VIX should drop over 20% in the last 6 days and should be down during the last 3 days.
  • ​VIX threshold: The ​VIX should spend less than 35% of time below 15.
  • ​VIX-​SPY relative position: The 10-day ​VIX ​stochastic should be below the 10-day ​SPY ​stochastic. In addition, the 10-day ​SPY ​stochastic should be higher than the yesterday's value.

Long positions are closed if the first two Long rules are triggered (Rising ​volatility and Trend).

The script allows you to display the readings of the indicators used in the strategy rules in the form of oscillator time series (as in the preview chart) and/or in the form of a table.
markoskatsanosOscillatorstascVolatility

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?


Tools and ideas for all Pine coders: tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Мои профили:

Отказ от ответственности