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 open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?