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/
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?