Please Note: Blog posts are not selected, edited or screened by Seeking Alpha editors.

Trend Following Signals Turn Bullish For S&P 500

|About: SPDR S&P 500 Trust ETF (SPY)

S&P resumes uptrend after rebounding from lows in December 2018.

Trend following model has recently given a BUY signal.

60% of companies in the S&P 500 are in an uptrend.

With the S&P back to 1% from it's all time high after rebounding from it's lows in December 2018, the question most people have is how much higher the index can rise? After all, we are in one of the longest (and most hated) bull markets in history, with no shortage of analysts predicting the next recession. 

I however, will ignore the noise from the crowd and focus on what the market data has to say. As a huge Python fan and a trend follower at heart, I rely on quantitative models to predict whether the market goes up or down based on patterns from historical price moments. The trend following model that I will be discussing in this article is the turtle strategy. The turtle strategy was used by one of the most successful trend followers in history, Richard Dennis, who borrowed $1,600 and reportedly made $200 million in about ten years. The strategy states that when the price of an instruments hits a 2 week high, we buy. And when the price of an instrument hits a 2 week low, we sell. 

Trend following model flashes a BUY signal

The plots below shows the results of my simulation. The top plot shows the price of the S&P 500 (dark blue line) sandwiched between it's rolling maximum (light blue line) and rolling minimum (purple line). Following the rules of the turtle strategy, when the price of the index crosses above it's rolling maximum, we go long on the index. When the price of the index crosses below it's rolling minimum, we close our long position. 

The profit and loss (PNL) value of the portfolio is shown in the graph below. We can see that the strategy will buy the index when the price is going up, and sell the index when the price is going down. This has the effect of providing downside protecting for the portfolio during times of crisis such as the 2008 recession where the index lost 56% while the trend following portfolio lost 21% only. Note that in October last year, the model showed that the markets entered a down trend, and liquidated it's position in the index. It recently went long on the index as the market rebounded back to it's all time high.

60% of companies in the S&P 500 are in an uptrend

With a computer, we can easily apply the trend following model above on all 500 companies within the S&P 500 index to observe the trend of the underlying components in the index. The results are shown in the plot below which shows the percentage of companies in an uptrend.  

We can see that in December last year, only 20% of the companies in the S&P 500 were in an uptrend due to the severe sell off in the market. Within a span of 4 months, 60% of the companies are now in an uptrend today. This reflects a significant improvement in the market breadth which is good news for the bulls. Hence, given the current market state, I see no reason to be on the side lines. I remain fully invested to take advantage of the uptrend in the market.

Disclosure: I am/we are long SPY.