TASC 2023.12 Growth and Value Switching System█ OVERVIEW
This script implements a rotation system for trading value and growth ETFs, as developed by Markos Katsanos and detailed in the article titled 'Growth Or Value?' in TASC's December 2023 edition of Traders' Tips . The purpose of this script is to demonstrate how short-term momentum can be employed to track market trends and provide clarity on when to switch between value and growth.
█ CONCEPTS
The central concept of the presented rotation strategy is based on the observation that the stock market undergoes cycles favoring either growth or value stocks. Consequently, the script introduces a momentum trading system that is designed to switch between value and growth equities based on prevailing market conditions. Specifically tailored for long-term index investors, the system focuses on trading Vanguard's value and growth ETFs ( VTV and VUG ) on a weekly timeframe.
To identify the ETF likely to outperform, the script uses a custom relative strength indicator applied to both VTV and VUG in comparison with an index ( SPY ). To minimize risk and drawdowns during bear markets, when both value and growth experience downtrends, the script employs the author's custom volume flow indicator (VFI) and blocks trades when its reading indicates money outflow . Positions are closed if the relative strength of the current open trade ETF falls below that of the other ETF for two consecutive weeks and is also below its moving average. Additionally, the script implements a stop-loss when the ETF is trading below its 40-week moving average, but only during bear markets.
The script plots the relative strengths of the value and growth equities along with the signals triggered by the aforementioned rules. Information about the current readings of the relative strength and volume flow indicators, along with the current open position, is displayed in a table.
█ CALCULATIONS
The script uses the request.security() function to gather price data for both equities and the reference index. Custom relative strength and volume flow indicators are calculated based on the formulas presented in the original article. By default, the script employs the same parameters for these indicators as proposed in the original article for VTV and VUG on a weekly timeframe.
Markoskatsanos
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.
TASC 2022.04 S&P500 Hybrid Seasonal System█ OVERVIEW
TASC's April 2022 edition of Traders' Tips includes the "Sell In May? Stock Market Seasonality" article authored by Markos Katsanos. This is the code implementing the "Hybrid Seasonal System" from the article.
█ CONCEPTS
In his article, Markos Katsanos takes an updated look at the "Sell in May" adage by reviewing recent historical data for seasonal equity market tendencies. The author explores the development of a trading strategy (a set of buy and sell rules) based on this research.
He starts from the enhanced buy & hold system featured in his July 2021 TASC article, and adds additional technical conditions. These include volatility conditions ( VIX and ATR ) plus the "Volume Flow Indicator" (VFI), which is a custom money flow indicator that Katsanos introduced in his June 2004 TASC article. He provides an example of a trading system that others can test for themselves and modify as they see fit. The author notes that the system could likely be improved further by adding money management conditions (such as a stop-loss), or by adding more technical conditions not considered in the scope of this article.
█ CALCULATIONS
The entry and exit rules that constitute the trading system are defined below. The critical values of VIX, ATR and VFI (specified below) used in the calculations were determined by optimization for a daily chart of the SPY ETF . By default, the strategy only allows long entries. However, the script offers the possibility to initiate short entries upon exiting long trades through the "Long Only" toggle in the script's inputs.
Long Entry Rules
• Seasonal: The seasonal trade is initiated on the first business day October at the open.
• Volatility: In case of high volatility, that is if the VIX is above 60% or the 15-day ATR was above 90% over the past 25 days, the seasonal trade is deferred until later in the month or year, when the volatility subsides.
Exit/Short Entry Rules
• Seasonal: The exit/short signal is triggered on the first business day of August at the open.
• Volatility: The exit/short signal is triggered if VIX is above 120 % (i.e. 2 times the corresponding threshold parameter).
• Money flow (VFI): The exit/short signal is triggered if the VFI crosses under a critical value (-20) while its 10-day moving average is pointing down.
Join TradingView!
Volume Positive Negative Indicator [CC]The Volume Positive Negative Indicator was created by Markos Katsanos (Stocks and Commodities April 2021 pg 9) and this indicator is useful for determining long trends but with some modification you can use it for short trends as well. Buy when the indicator line is green and sell when it turns red. Make sure to experiment with the threshold and see what works best for you.
Let me know if there are any other indicators you want me to publish!
Volume Positive Negative (VPN)The idea and calculations for the Volume Positive Negative (VPN) indicator were created by Markos Katsanos. Markos wrote about the indicator in the article Detecting High-Volume Breakouts, published in Technical Analysis of Stocks & Commodities April, 2021 (Vol. 39, Issue 5).
The goal of the VPN indicator is to detect breakouts using only volume. The basic idea is to compare volume on up days versus volume on down days. The indicator can oscillate between the range of -100 and 100. Values between 0 and 20 are generally considered bullish, negative are bearish.
When the plotted VPN crosses over what Markos refers to as the critical value, that may indicate a high volume breakout. The critical value can be adjusted between 0 to 20, 10 is the default,
Volume Positive Negative Calculation (VPN)
VPN = (VP - VN) / MAV / Period * 100
VP - sum of positive volume
VN - sum of negative volume
MAV - moving average of volume
Volume is considered positive when the average price is higher than the previous day's price by more than .1 of the ATR (average true range).