PyInvesting

Outperforming with quantitative, data driven investing.


MG
11 months, 3 weeks ago · 295 Views

WRITTEN BY

MG

M. G. is a portfolio manager engaged in deep-dive analysis of company fundamentals and market cycles, achieving high return performance over both short-term and long-term periods. His technocentric focus allows him to identify companies with distinct competitive edge in the market or unique investment angles in a fast-changing era of innovation.


Outperforming the market with high dividend yield stocks
One of the key factors most investors look out for when purchasing stocks is how much dividend the stock pays. A dividend is a reward that the company pays to its investors which usually stems from its net profit. When a company pays high dividends, it usually indicates that a company is doing well and is able to distribute part of its earnings to its investors. These companies tend to be large, established companies with strong and predictable cash flow. However, not all companies that pay high dividends make good investments. Some companies continue making dividend payments even when they are not profitable. This is to maintain their track record of making regular dividend payments. An example would include Exxon Mobil, a huge oil and gas company. Exxon Mobil has a consistent tracking record of paying dividends every quarter since 2013. However, an investor that bought the company since 2013 would have lost 14% vs the S&P 500 which made 101% during that period.   Do high dividend yield stocks outperform? From an investment universe of 500 stocks, I select 50 stocks with the highest trailing dividend yield. The trailing dividend yield is the dividends per share over the trailing 12 months divided by the stock price. It is a measure of how much cash flow you are receiving for every dollar you invest in the stock. To select the stocks, I rank each stock in the universe based on their trailing dividend yield. I equal weight each of the 50 stocks in the portfolio to reduce the concentration risk of the portfolio. This will prevent my portfolio from taking a big hit if any single stock crashes. In addition, stocks with the strongest signal within each sector are selected such that no single sector has a weight larger than 20% of the portfolio. This reduces sector risk and allows us to isolate the source of out performance due to the high dividend yield signal.   Performance The backtest results show that the high dividend yield strategy has an annualized return of 10% and volatility of 20.7%. The strategy has cumulative return of 255%, outperforming the S&P 500 benchmark by almost 55% since 2006. We can also analyse the performance of the high dividend yield strategy over different periods. The plots above show that during the great financial crisis, the strategy’s performance was almost in line with the S&P 500 benchmark. During the crisis recovery period from 2009 to 2012, the strategy significantly outperformed the benchmark by 80%. However from 2013 to 2019, the strategy has been giving up some of those gains, under performing the benchmark by 60%.   Conclusion By selecting a portfolio of stocks with the highest dividend yield in each sector, we were able to develop a strategy which outperforms the market. The simulation also showed that the strategy performed well during the crisis recovery period but gave up a significant chunk of its gains during the new normal period from 2013 to 2019. In the next article, I will be discussing how we can improve the performance of the high dividend yield strategy by combining it with the quality factor.
Ivann Fok · 11 months, 4 weeks ago
Choosing high quality value stocks that outperform
When it comes to investing, everyone loves to talk about glamorous stocks such as the FAANG stocks (Facebook, Apple, Amazon, Netflix, Google). These are the stocks that get a lot of attention from investors and make good conversation topics at parties. However, is now the best time to be holding these stocks? Probably not, if you are a believer in value investing as these highly popular stocks are pretty expensive relative to their earnings. In my previous article, I wrote about how the value investment theme of selecting cheap stocks outperforms expensive stocks. We also discussed how value investing is subjected to risks such as the value trap, where cheap stocks continue to remain cheap because the company fails to improve and innovate.   Can we do better? In this article, I investigate how we can improve our value investing strategy by filtering for high quality stocks. By selecting stocks that are both cheap and are highly profitable, it is possible to increase the performance of our strategy.   How do we select quality value stocks? From an investment universe of 500 stocks, I select 50 stocks with the lowest price to earnings ratio (PE ratio) and the highest return on equity (ROE). The PE ratio is a stock’s adjusted close price divided by its earnings per share (EPS). A low PE ratio implies that the stock is trading at a low price relative to its earnings. A cheap stock has a low PE ratio. The company’s ROE is its net income divided by its average total common equity. It is a measure of how much profit a company can generate with every dollar of capital. A high ROE implies that a company is highly efficient because it is able to generate profit with relatively little capital. A quality stock has a high ROE. To select the stocks, I rank each stock in the universe based on their inverse PE ratio (since we want stocks with a low PE ratio to have a high ranking) and ROE. Next, I take the average of each stock’s PE ratio ranking and ROE ranking. This gives me an overall signal which combines both value and quality factors.   Risk management I equal weight each of the 50 stocks in the portfolio to reduce the concentration risk of the portfolio. This will prevent my portfolio from taking a big hit if any single stock crashes. In addition, stocks with the strongest signal within each sector are selected such that no single sector has a weight larger than 20% of the portfolio. This reduces sector risk and allows us to isolate the source of outperformance due to the value and quality signal. I do not want the strategy to outperform or underperform because it was overly exposed to a single sector but rather because the strategy was invested in cheap and high quality stocks across all sectors.   Performance The backtest results show that the quality value strategy has a cumulative return of 238%, outperforming the S&P 500 benchmark by almost 50% since 2006. More importantly, by including the quality factor to our pure value investing signal, the performance of our strategy has improved! The quality value strategy makes an annual return of 9.6% vs the pure value strategy which makes 8.9%. Besides increasing the returns of the strategy, the quality value strategy has a lower volatility of 19.4% vs the pure value strategy’s volatility of 19.7%. This means that the risk of the strategy has decreased. As a result, by combining the quality factor to our value factor, the risk adjusted returns of the strategy has increased. Hence for the same level of risk, the quality value strategy makes a higher return. This is reflected by the higher Sharpe ratio of the quality value strategy 0.57 vs 0.53 of the pure value strategy.   Conclusion By combining the quality factor with our initial value investing strategy, our backtest has shown that we are able to achieve higher risk adjusted returns. This is because the stocks from our quality value strategy are both cheap and highly profitable. While Warren Buffet once said that it’s better to buy a wonderful company at a fair price than a fair company at a wonderful price, I would argue that it’s even better to buy a wonderful company at a wonderful price.
Ivann Fok · 11 months, 4 weeks ago
Will value investing make you rich?
Warren Buffet, the 3rd richest person in the world with a net wealth of 86.3 billion, made his fortunes through value investing. Can we replicate his strategy to get similar results? I ran a historical simulation of a value investing strategy and will be answering the following questions: What are the rules used to select value stocks? How profitable is the value investment strategy if we used it from 2006 until today? What is value investing? Value investing is an investment strategy that selects stocks which are cheap relative to their earnings. These stocks are undervalued relative to other stocks due to the market’s overreaction to bad news. This gives value investors the opportunity to take advantage of the low prices to make huge profits when the prices revert back to their fair value. However, a value investment strategy is not without risks. A cheap stock can become cheaper if the company fails to improve, manage its cost and innovate. This is known as a value trap, which is every value investor’s nightmare. Hence, value investors take on this risk for the chance to be rewarded with huge profits in the long run. Their investment horizons are usually at least 3 years and they will close their positions once the price is no longer attractive relative to its fair value.   How do we select value stocks? From an investment universe of 500 stocks in the S&P 500, I select 50 stocks (top 10%) within the universe with the lowest price to earnings ratio (PE ratio). A low PE ratio implies that the stock is trading at a low price relative to its earnings which is an ideal candidate for value investors looking for cheap deals. I equal weight each of the 50 stocks in the portfolio to reduce the concentration risk of the portfolio i.e. each stock in the portfolio has a target weight of 2%. The weights will deviate from 2% as the prices of stocks within the portfolio go up or down. If the weights deviate too far, the stock is re-balanced back to it’s target weight. I’m not interested in how a single stock or a few stocks perform, but how the value investment theme performs. This means looking at a group of stocks (10% of the universe) with a low PE ratio and finding out if it outperforms the market as a whole. Another key aspect of the portfolio construction is sector neutrality. A stock that is cheap in the tech sector may be considered expensive to a stock in the utilities sector based on PE ratios. It does not make sense to compare the PE ratio of stocks between sectors because each sector has its own unique characteristics. Hence we select the stocks with the lowest PE ratios within each sector to ensure that we do not end up with a bias towards sector that tend to have lower valuations. The plot below shows that the portfolio does not tilt towards any specific sector with every sector having a weight of under 20%.   Simulation Results The simulation results show that the value investment strategy has an annual return of 8.9%. The strategy outperformed the S&P, making a cumulative return of 210%. While the strategy’s total returns are high, it’s comes with higher risk. It’s annual volatility is 19.7% vs the market’s historical volatility of 17%. In addition, there are certain periods where the strategy performs worse than the market. If we compare the performance since 2013, the simulation shows that while the S&P makes 130%, the strategy only makes 80%. That’s a whopping 50% difference in performance. An investor that bought value stocks since 2013 will not be too happy!   Conclusion Value investing has shown promising results overall, providing exceptional returns during certain periods in the past. Cheap stocks do have the tendency to outperform expensive stocks. However, there are still risks involved where the investor might not be rewarded for taking on the value risk premium, such as the period from 2013 onward. This goes to show why most successful value investors have a long investment horizon from 3 years onward. This gives them ample time to ride out periods of under-performance for the chance of making huge profits in the long run.
Ivann Fok · 11 months, 4 weeks ago
How Do You Trade Trends in the Market?
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 instruments hits a 3 month high, we buy. And when the price of an instrument hits a 3 month low, we sell. The strategy provides an effective form of capital protection for investors yet allows investors to participate in the upswings of the market.   Backtesting the turtle strategy To test the effectiveness of the turtle strategy, I simulated the strategy using a backtesting framework built with Python. The simulation works by: Pulling historical prices of the S&P 500 ETF (SPY) into my database. Building the trading signals by using the rolling maximum/minimum of a 3 month window period. Submitting orders whenever a buy or sell signal was generated. Generating plots to show the results of the backtest. The plots below show 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 its rolling minimum, we close our long position. The profit and loss (PNL) value of the portfolio is shown in the lower graph. $1 million dollars invested in 2002 would result in slightly over $2.5 million today. While the returns may look unimpressive, traders typically use highly leveraged financial instruments such as futures contracts to magnify gains. This is possible because of the lower risk of the strategy which provides downside protection. For example, during the 2008 recession, the portfolio only lost 18% vs the market (down 56%). To most investors, however, this strategy would not be appealing because of its high turnover. We can see that to employ this strategy, investors would need to frequently buy and sell the index. This is highly inconvenient and would result in high trading cost.   Can we do better? The original turtle strategy used a 3-month signal horizon to trade the market (i.e. they bought the index when it’s price hit a 3 month high and sold the index when it’s price hit a 3 month low). With a computer, we can easily run the strategy using different parameters for the signal horizon and figure out the set of parameters that results in the best performance. Here are the results. The metric I used to gauge the performance of the strategy is the Sharpe ratio, which measures the return to risk ratio. The higher the Sharpe ratio, the higher the return of the strategy for a given level of risk. The results show that the strategy using 80 days for the maximum rolling window and 110 days for the minimum rolling window has the highest Sharpe ratio of 0.26. Now let’s re-run our simulation using these parameters. The results show that $1 million dollars invested in 2002 would result in slightly over $3.5 million today. That is a whooping 170% higher than the original turtle strategy. The frequency of trades is also much lower, making it easier to implement and incurring lower transaction cost. When it comes to investing, everyone has their own styles and strategies. I rely on systematic strategies because I can simulate their performance and convince myself that they can outperform the market.
Ivann Fok · 11 months, 4 weeks ago