Welcome to QuantHead!

Welcome to QuantHead! I hope you find some interesting ideas here that I've encountered on my journey of learning and share your wisdom with me. Enjoy!

Friday, May 22, 2015

10,000 Page Views!


Today QuantHead reached 10,000 page views since its birth just over 7 months ago.
The U.S. clearly shows the most interest, and I'm happy to see readers from around the world.


Of the strategies presented, the Global Market Rotation model takes the all-time lead, though in the recent months the Modified Dual Momentum model has presented, well - the most momentum!


Thanks again for reading and sharing, and see you at 100,000!

Monday, May 18, 2015

Treasury Yield Curve

Low interest rates pose a major concern for the current market environment, especially as far as rotation strategies are involved. As witnessed by the chart of the 10-year U.S. Treasury Note (^TNX), we've been in a general environment of declining interest rates since the early 1980's, which also has been fueled by the dovish monetary policy of the Federal Reserve over recent years.


The reason this poses a concern is that once the Federal Reserve determines that it will no longer continue its quantitative easing policy, interest rates should start to rise. Especially the bond market will likely be adversely affected by this. Many of the rotation strategies don't have a cash-stop, but rather use (long-term) U.S. Treasuries as a safe-haven when stocks start to underperform. However, in a rising rate environment, especially long-term bonds may no longer act as a safe-haven in case of a pullback, correction or a prolonged bear-market. Therefore it becomes crucial to know when rotation strategies may no longer perform as expected (i.e. when to get out). Even with a buy-and-hold strategy, a typical 60/40 or 70/30 stocks to bonds allocation may no longer work to minimize portfolio drawdowns in a rising rate environment.

I recently came across this chart, provided by LPL Financial Research. It shows how, since 1967, treasury yield curve inversions have marked stock market peaks before a downturn and recession.


Though surprisingly accurate, the yield curve sometimes gives a signal way before the correction, e.g. August 2006 signaled a downturn, which didn't actually start until October 2007.

This made me wonder that maybe if I combined the indicator with the "AdvDecnCumAvg" indicator that I provided a few posts ago, I'd get a more robust signal system.

I analyzed all U.S. bear markets since 1966, listed at Gold-Eagle. Though not an official bear market (> -20%), I also included the correction of July 1990 - October 1990 (~ -15%), which was predicted. Both indicators gave a false positive in December 1978 and the Black Monday crash of 1987 was not predicted. There was no AdvDecn data available for the first bear market of 1966, but the yield curve signaled the downturn very accurately.


Occasionally the yield curve would provide the first signal (yellow), and at other times AdvDecn would provide the first signal. The second (green) signal acts as the final trigger signal.

Though admittedly not that many data points, existing data would suggest that when using these two indicators in conjunction with each other, assuming historical data applies in the future, we can somewhat accurately predict a future major downturn in the stock market without leaving too much on the table by running to the fences prematurely.

A glance at the treasury yield curve today, on May 18, 2015, along with the AdvDecnCumAvg, would suggest that a major market correction isn't looming behind the corner, yet. Please find the link to the automatically updating Google Sheet below.






QH U.S. Treasury Yield Curve

Saturday, May 9, 2015

S&P 500 Smart Money Screener

To continue on our journey of screening for market anomalies, I've created a "smart money" screener for the S&P500. Quantified Alpha recently published an article that identifies market anomalies that have been academically proven to provide alpha (i.e. risk-adjusted outperformance over the overall market), or in English; proven "to work", when systematically exploited.

The first of the identified anomalies is the value anomaly, stating that over the long run, the returns of cheap stocks outperform expensive stocks. My previous post with the value screener may be helpful to identify stocks or sectors that currently identify themselves as good value.

The second anomaly is the momentum anomaly, stating that on average, past winners continue to outperform and past losers will continue to underperform. Most of the QuantHead blog concentrates on the momentum anomaly with providing relative strength (/ absolute strength) rotation models.

The third anomaly is the "smart money" anomaly, which states that when company insiders, financial institutions and short sellers are bullish on a stock, it tends to outperform and vice versa. The article suggests three metrics to focus on: 1) short interest as % of total float, 2) net change in company insider ownership over the last 6 months and 3) net change in institutional ownership over the last 3 months.

By using a similar approach for my smart money screener as the value screener of the previous post, these three metrics are each ranked from 0-100%, summed up and ranked again from 0-100%, providing a "Smart Money Rank". I also provide a "Trending Smart Money Rank", which ranks the top decile (50 stocks) by their 6-month performance. And once again I provide a chart, which I call "Smart Money Sectors". It would seem that as of May 9, Financials and Consumer Goods are in the lead. Please find the link to the spreadsheet below.

The fourth anomaly according to Quantified Alpha is the business quality anomaly, which states that companies that manipulate their earnings in the short-term will vastly underperform in the long-run. I don't have access or haven't been able to find any of the data that they suggest as metrics to focus on: 1) R/D expenses as percentage of assets, 2) earnings accruals as percentage of assets, 3) external financing to assets, 4) depreciation to capital expense ratio. Therefore, I'm not able to build a screener for the fourth anomaly.

The fifth anomaly is the earnings momentum anomaly, which states that companies that have beaten analyst estimates in the past, are likely to keep beating them in the future. The suggested metrics are 1) streak of EPS/revenue beats in a row, 2) last quarter EPS/revenue surprise % and 3) number of estimate beats in the last 3 years. Similar as to the fourth anomaly, I don't currently have access to these metrics, so I won't be able to build a screener for the fifth anomaly.

For anyone interested, it might be possible to build screeners for the fourth and fifth anomalies with Quantshare, Amibroker or Equities Lab, though like Quantified Alpha, these services require a subscription or an upfront fee.


QH S&P 500 Smart Money Screener

Saturday, May 2, 2015

S&P 500 Value Screener

May 4, 2015 Update: The sectors are now inversely weighted according to each sector's weight in the S&P 500, for a better representation of undervalued sectors.

Inspired by Paul Novell's composite value score (VC2) that he bases many of his systems on, including the "Trending Value System", I created a screener that attempts to showcase currently undervalued stocks of the S&P 500. Note that Paul's systems aren't only restricted to S&P 500, but because of the dynamic data pull, Google Sheets isn't too happy with data for thousands of stocks.

Paul bases his composite value score on the insights of several quant researchers (including the book "What Works on Wall Street") that choosing stocks based on a composite of value metrics over time outperforms portfolios based on solely one metric.

Determining a valuation of a company is often difficult, especially when trying to compare valuations across sectors and industry groups. Some like to look at the price-to-earnings ratio (P/E), but a lot of tech stocks often trade at seemingly premium value. Some like price-to-book (P/B), but REITs often trade below their book values. There seems to be trade-off's with each valuation metric.

I've attempted to create a valuation score similar to Paul's composite value metrics, which takes into account price-to-earnings (P/E), price-to-book (P/B), price-to-sales (P/S), price-to-free cash flow (P/FCF), enterprise value-per-earnings before interest, taxes, depreciation and amortization (EV/EBITDA) and dividend yield.

Each metric is ranked by percentage, 100% is granted to the best ranking stock. If data (dynamically pulled from FinViz and Yahoo Finance) for a metric is missing, a value of 50% is assigned for that metric, to reduce an unfair bias against the stock.

All the metrics are then summed up and once again ranked from 0-100% to provide a "Valuation and Yield Rank". The last column: "Trending Value Rank", similar to Paul's "Trending Value System", takes the top decile (50 stocks) of the "Valuation & Yield Rank", and ranks them by their 6-month performance.

I've also added a second sheet, "Undervalued Sectors", which shows the sectors of the 50 currently highest ranked stocks. Whether you decide to sort the stocks (from Z-A) by valuation and yield alone, or also taking into account recent price performance, it would seem that as of May 2, 2015, "Financials" and "Basic Materials" boast some of the best valued stocks of the S&P 500.






QH S&P Value Screener