PineCodersTASC

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.

Tools and ideas for all Pine coders: www.tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
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?