Momentum Based Balancing

Part two in a series

A few months ago, I presented a novel method for balancing a widely diversified portfolio. By “widely diversified,” I mean all asset classes, foreign and domestic. This is to reduce inter item correlation. Here are the balancing rules:

  • Look at last month’s return for each of the nine EFTs
  • Drop the bottom two of ten (including cash)
  • Add a constant to the remaining eight, so that the lowest score is set to 0.0%
  • Allocate funds to these issues, pro rata by their adjusted score
  • Repeat monthly

These rules produced pretty good results in backtesting over a ten year period. The method, and the portfolio, are described in the earlier post.

Table1You are probably thinking that last month’s return is a poor predictor for next month, and that’s certainly true for individual stocks. Here, though, we have a diverse group for which relative rank is predictive. For each month, I ranked the ten issues (including cash) from 1 to 10, with 10 being the lowest return. The table below shows the following month’s return for each rank.

Table2

For this group, rank does indeed predict next month’s return, with an R2 of 0.35. I also tested the hypothesis that the top five’s average trailing return of 0.7% is greater than the bottom five’s 0.2%, and it is (with 96% confidence). You can check this yourself by downloading monthly data series for the given ETFs.

Rank based on a three month lookback is an even stronger predictor, with an R2 of 0.81 (chart below). Running model #3 with the longer lookback increases its CAGR to 9.9% and its Sharpe to 0.76.

I keep saying “for this group,” because the method depends on low inter-item correlation. The theory is that the portfolio will cover the gamut of asset classes, with institutional flows to the leading classes persisting for several months. I selected the portfolio based on this theory, which is quantified by an average inter-item correlation of 35%.

It’s not really a rotation model. If you are rotating, say, sector funds, then you are still concentrated in U.S. equities.

The nine sector funds, shown above, are a strongly correlated group with no negatively correlated pairs. The minimum correlation coefficient is 20% (between XLK and XLU) and the inter-item mean is 55%. For this group, rank has no predictive value. The R2 is around 0.001. I’ll show results for some additional low correlation portfolios in a later post.

Posted in Strategies | Tagged , , , | Leave a comment

QE Bulls Are Back

If you follow the market every day, as I do, you can observe two distinct groups of bullish investors.  This is hard to depict on a chart, but I am going to try.  One group responds normally to economic news, selling when the news is bad.  The other group buys on bad news, anticipating monetary stimulus from the Fed.

One way to spot this behavior is to discount market movements according to changes in the dollar.  The S&P 500 has rebounded in February, while UUP has fallen steadily.  Investors move to GLD as an inflation hedge, and that chart shows the same thing.

DollarAnother way is to compare the market to some gauge of economic health.  Below, we see that the ECRI weekly leading index peaked in early January.  This is a little fuzzier than seeing the market react day by day, but you get the idea.  Bulls in today’s market are buying QE.

ECRIFor several weeks around Christmas, the “recovery” meme held sway.  The market correction on Jan. 23 was caused by this group losing faith.  The bounce that began on Feb. 4 was part of a normal corrective pattern that could be attributed to either group.  Following Janet Yellen’s testimony on Feb. 11, however, the QE bulls are back in charge.

The new Chairperson said she would continue the former policy of winding down QE, but the market did not believe her.  This is probably because of her shift from unemployment statistics to direct targeting of inflation.  Observers interpreted this as an opening for slower tapering, if not an outright reversal.

Posted in Economics, Indicators | Tagged , , , , | Leave a comment

Levy Dispersion Update

I watch $OEXA200R on Stockcharts, which says that 74 of the S&P 100 are trading above their respective 200 day moving averages.  It is generally considered a bad idea to go long when this figure is below 65, or in a downtrend.  The full method is here, thanks to John Carlucci.

I also compute a related statistic, which says that 60% of the S&P 500 are trading above their SMA(131).  Being broader, smoothed, and using a shorter average, this statistic may react faster than $OEXA200R.  The calculation is here.

Levy FebThe advantage of doing it this way is that you can see the central tendency of the 500 stocks.  The vertical axis shows individual stocks, of the 500, not a percentage.

This month, the mode is bang on 1.0, which is weaker than last month.  The mean has fallen from 1.06 to 1.02.  As we proceed into the correction, I would expect the median to fall below 1.0, meaning that half are trading below the moving average.

Posted in Indicators | Tagged , , , | Leave a comment

Correlation with Bond Yields

Hat tip to Gökhan Kula for sending this along.  For the few years I have been trading, bond yields have been strongly correlated with stocks.  Stocks go up when bonds go down, so much so that I regard SPY and TBT as the same play.

I have the following chart in my collection on stockcharts.com, just in case the correlation should someday break.  That seems to be happening now, with post-QE yields headed toward 3%.

TNX CorrelationMy chart, below, recapitulates the analysis of J. P. Morgan.  It shows the rolling two year correlation of weekly S&P 500 returns with weekly changes in the 10 year Treasury yield, plotted against the  Treasury yield.

SPX TNX CorrelationThis is the correlation of correlation, so to speak, with bond yields.  You can see that the strong correlation, to which I am accustomed, becomes weaker and then negative as yield rises through 5%.  Of the 2,700 or so datapoints, only 415 have TNX < 4.0, so this low yield is an historical anomaly.  Here is the timeline (note the log scale).

TNX LifeSince 2008, the correlation has seldom been below 0.4, and often as high as 0.7.  Here’s what that has looked like in terms of weekly returns.

Scatter3For comparison, here is that ancient period when stocks and yields were negatively correlated – or, to put it another way, stocks and bonds rose and fell together.  Don’t ask me what asset class funds flowed to when both were down.  Cash or real estate, I suppose.

History

Posted in Economics | Tagged , , | Leave a comment

Portfolio Balancing Models

Part one in a series

When you read about portfolio management, the emphasis is typically on selecting issues for diversification – an inflation hedge, real estate, bonds, etc.  The allocation of capital within the portfolio is then revised periodically (rebalanced) based on some rules.  Nowadays, you can do this entirely with ETFs.

In this post, I will present some alternative balancing models, with different risk return characteristics.  Requirements for each model are:

  • Mechanical rules suitable for a nonprofessional (or a robot)
  • Balance once each month, to reduce commissions
  • Rule for going to cash

The choice of ETFs is secondary.  The main thing is that they be diverse.  That is, weakly (or negatively) correlated with each other.  I’ll come back to that in a later post.  For now, I present this portfolio without comment:

  1. SPY – SPDR S&P 500 ETF Trust
  2. EFA – iShares MSCI EAFE Index Fund
  3. IEF – iShares Barclays 7-10 Year Treasury Bond Fund
  4. TIP – iShares Barclays TIPS Bond Fund
  5. EEM – iShares MSCI Emerging Markets Index
  6. IWM – iShares Russell 2000 Index
  7. XLB – Materials Select Sector SPDR
  8. IYR – iShares Dow Jones US Real Estate
  9. TLT – iShares Barclays 20+ Yr Treasury Bond

The chart below shows their performance over the ten year period.  It’s hard to look at, but you can see the 2008 crisis and the jump in bond prices.

Chart0This is end of month data, and the period is January 2004 through January 2014.  We are going to write our rebalancing rules based on the month end figures, and assume we can buy at roughly that price to start the new month.  We are also going to assume a smooth allocation to the ETFs, disregarding lot sizes.

The chart below shows the performance of a balanced portfolio versus SPY.  We start with $1,000 in each of the nine ETFs, plus $1,000 cash.  Each month, we rebalance the total, one tenth into each category.  I call this the “equal allocation” model.  It is probably the most natural, intuitive way to do it.

Model1This model performs slightly better than SPY, returning 68% over the period versus 58%, and with less risk.  The standard deviation of monthly returns to the model is 3.2% versus 4.2% for SPY alone.  It does not perform as well as some of the other issues, in absolute or risk adjusted terms.  Since TIP is handy in the portfolio, we’ll use it to compute Sharpe ratios for whole group:

Table1The ETFs to beat are EEM and IWM, for absolute and risk adjusted returns, respectively.

Perhaps you have noticed a flaw in the logic of this model.  As Loeb says in his book, it has the effect of moving capital from issues that are performing well, and “spreading the wealth” to those that are not.  For the next model, we rebalance pro-rata according to how well each fund has done over the last month.  Here’s how that performs:

Model2In the first month we start with equal allocations, and we make a 2.3% return (actually, a little less because we start with $1,000 allocated to cash).

Table2For the next month, we allocate according to how each fund performed as a percentage of the total.  This “total” figure only serves to make the pro-rata calculation.  Here is the result:

Table3In this month, XLB did best, so it gets the most capital going into the next month.  This approach kind of assumes that last month is a predictor of next month’s performance, but not really.  That’s a proven fallacy.  What the model assumes, after Levy, is that last month’s relative rankings within the group are predictive.

I call this the “winners only” model, because it allocates only to those issues making gains.  Its average monthly return of 1.1% dominates EEM, and its variability is less than SPY.

Results for this model are impressive, but it has some drawbacks.  In some months all issues lose money, leaving no choice but to reuse the prior month’s rankings.  It also cannot go to cash.  Finally, the model produces a very erratic mix of issues from month to month.  The chart below shows the portfolio mix for a representative year:

Histo2This is the killer.  No one would think of running a retirement portfolio like this.  For the next model, we keep the pro-rata concept, but we resolve to stay in nine of the ten issues (counting cash) every month.  We do this by baselining all issues relative to the month’s worst performer.  For example, in a month where the returns are:

Table4We find the biggest loser, 2.6%, and add that amount to each return:

Table5Then, we repeat the pro-rata allocation as before.  Note that cash, which always returns zero, receives an allocation when any other issue makes a loss.  I call this the “drop one loser” model.  In this example, XLB is the biggest loser, and so the portfolio will hold no shares of XLB in the next month.  If all issues make gains, then cash is weakest, and the model goes fully into ETFs.

Model3This one is not as chaotic as model #2, but it also doesn’t perform as well.  Its monthly average return of 0.7% is weaker than IWM.  I’ll give a thorough comparison at the end.

Finally, I find a middle ground between models #2 and 3, by baselining to the second weakest performer.  Thus, the month shown above would be baselined to -1.7%, dropping SPY as well as XLB.

Table6The resulting allocation is:

Table7I call this the “drop two weakest” model.  I could go on with dropping three, etc.  This one has, to my eye, the right amount of churn from month to month.  Here is 2005 again.  If you compare it with the histogram above, you can see the resemblance (the colors are the same).  Model #4 tends toward the same issues as #2, but it doesn’t go all in.

Histo4The chart below shows all four models on the same chart.  Model #2 is the overall best performer.  Its superior return and low drawdown compensate for its higher variability.  If this were my IRA, though, I would go with the less erratic model #4.

Model4Safe, timid, model #1 has the worst drawdown of the bunch.  It continued shoveling money into stocks during 2008.  That’s why “equal balance” models need explicit warning signals to move out of stocks.  The other three models have implicit warning signals that move them seamlessly into cash and bonds.   Here is the drawdown chart:

DrawdownThe table below summarizes results for the four models.  I like to see the returns and variability on a monthly basis, instead of discounting the total return.  I think that’s more appropriate for this application.  Apart from that, my Sharpe ratio is conventional, using TIP as the risk free return.

Table8As long as you have negatively correlated issues to work with, you can achieve your desired risk return tradeoff by tweaking the model.  It’s kind of like the CAPM of portfolio balancing.  I will cover the selection of ETFs in a later post.

Posted in Strategies | Tagged , , , , , | Leave a comment

Short SPX for 2014

The purpose of this post is to explain why and how I shorted the S&P 500 on Jan. 6.  In an earlier post, I described the two methods I use for detecting “tops” or, more precisely, local maxima.  I also said that I don’t trade this signal.  In fact, since I use a countertrend strategy, I will be taking long swing trades all the way down.

The chart below shows SPX going trendless in early December.  You see ADX(14) < 20 and you also see SMA(10) go flat.  There’s a crazy ramp at year-end, and then SMA(10) resumes flat.  I reasoned that many investors were holding off selling until the new tax year, so I ignored the ramp.  This theory is supported by the low volume.

TrendlessThe other method is to count distribution days.  I posted this next chart on stocktwits, last Thursday.  By that time, I was very surprised the IBD hadn’t registered “under pressure.”  The chart shows daily volume, and it also shows Chaikin’s money flow, a handy way of evaluating up and down volume.

NYSEPeter Brandt said it best.  Chart reading doesn’t enable you to predict the future.  It enables you to take trades with favorable risk reward.  In this case, I could set my stop 1% away at “new all time high,” against the possibility of a prolonged decline.

The other issues I might have chosen to short, QQQ and IWM, were already more than 1% off their peaks.  The Russell had peaked earlier (another tell) on Boxing Day.  Speaking of Canadian holidays, last week I posted my approach to currency hedging.  Instead of selling SPY short, I bought SH, the 1x inverse ETF.  The market usually moves opposite to the USD, so my negative USD position is a hedge.

I might also have bought SDS, the 2x leveraged ETF, but then my stop would be 2% away.  It’s confusing enough having to remember that my mental stop to cover SPY at 184.69 is really to sell SH at 25.22. Happy new year!

Posted in Indicators | Tagged , , | Leave a comment

Robots Strike Again

I posted about this a few weeks ago, and now Twitter has supplied another example:

RobotsThis trader would still be in a not bad position but, once his stop was triggered, he got hosed for a $2.41 loss.  Nothing is more frustrating.  If you can’t be at your screen, then you may have to use a hard stop.  Otherwise, keep it close to your vest.

Here is Hunsader’s wonderful close up of gold futures plunging $30 (instantly) on heavy volume, and triggering a ten second halt.

Nanex_GCThe halt gave alert traders the opportunity to get back in, for futures.  Stock traders were not so lucky.

Posted in Trading | Tagged , | Leave a comment

For Canadians Only

In addition to system trading, I like to keep part of my capital in a “macro” trade.  This is some perversity of having read too much economics at business school.  Last summer, I went short U.S. bonds.  This returned 5% over three months.  I might have kept it on.  TBT is up another 7% since.

If your base currency is not USD, then your macro trades are also currency bets.  For example, I chose to short U.S. bonds by buying TBT instead of shorting TLT.  This means that my long TBT position was offset by a USD denominated debt.  I reasoned that if the Fed chose to buy down U.S. bond yields, they would cheapen the USD.  So, my trade implicitly included a currency hedge.

If I had instead shorted TLT, then I would be sitting on a lot of USD.  I would be betting on bonds to go down but not USD, an unlikely combination.

When you trade U.S. markets with a CAD account, IB automatically loans you USD.  My CAD capital is basically collateral for a USD trading business.  I withdraw profits in CAD, to pay the bills, and every so often (when USDCAD is rich) I explicitly convert the accrued USD balance.

CHFThis is not really for Canadians only.  Wherever you are, your choice of base currency is arbitrary.  What really matters is the currency in which your expenses (and taxes) are denominated.  Still, you can’t go wrong with Swiss Francs.

Posted in Economics | Tagged , , | Leave a comment

Thoughts on Correlation

Mean reversion is aided by volatility, and momentum trading is aided by relative strength.  I have been exploring the distribution of relative strength.  Market strength and breadth are handily characterized by the mean and standard deviation of this distribution.  It is almost a measure of market correlation, but not quite.  I am tempted to call it “collimation,” because it measures how tightly the body of stocks hew to their long term trends.

I can find only one published measurement of market correlation.  The CBOE computes implied correlation, based on option prices for fifty stocks.  See the CBOE website.  Below is a chart showing correlation, along with VIX and the SPX.

CBOE CorrelationThe CBOE data is hard to work with, because each of the series is based on options expiring in January of a different year.  For example, the nearest dated series just became KCJ, which is based on options expiring January 2015.  I produced a long series for this chart by splitting each year at July 1.  So, instead of 2-14 months, the concatenated series uses options expiring in 6-18 months.  This avoids the jolt of switching series at yearend.

There are times when index option implied volatility moves and there is no corresponding shift in implied volatilities of options on those components. This outcome is due to the market’s changing views on correlation.

It would be nice to measure historical correlation among stocks, directly, so I charted the average 20 day pairwise correlation among the nine sector ETFs.  I think this is a pretty good indicator, but it doesn’t predict JCJ.  Instead of the 36 pairs, you can simply compare each ETF to SPY.  The results are about the same.

CorrelETFSome people like to combine correlation and volatility into a single ratio, JCJ/VIX.  What does this number mean?  I’ll come back to that, but first let’s consider how we might use correlation and volatility to characterize market conditions:

Low correlation and volatility – This is an emerging bull market, which rewards good stock selection.  If it persists, though, the herd will follow and correlation will increase.

Low volatility, and correlated – This is a mature bull market, in which all stocks are rising together.  You might as well just buy the index.

Uncorrelated, and volatile – Simmering volatility with low correlation means that diversification is protecting the VIX but weak stocks are suffering.

High correlation and volatility – Elevated VIX means the market is in trouble, and all stocks are going down.  In a crisis, as Dr. Bandy says, all correlations go to 100% (or at least 80%)

I find it best to look at JCJ (or KCJ) and VIX independently.  So, why do people use the ratio?  Here’s the best explanation I can think of.  Start with the formula for index volatility:

Fig1Recognizing that ρ = 1 where i = j, we can write a more compact formula:

Fig2You can see how VIX is affected by the pairwise correlation term. The formula for average correlation is:

Fig3Since:

Fig4Then:

Fig5This makes intuitive sense.  It’s the sum of the weighted variance terms with pairwise correlations, divided by the same sum without them.  In fact, it’s a lot like:

Fig6This is different from JCJ because it includes the same-stock (i = j) cases.  Still, since:

Fig7You could make a case for VIX2/JCJ as a gauge of total volatility “under the surface.”  I am not a fan of this, although it would be interesting if the CBOE were to publish an absolute volatility index without the diversification effect.

I can think of one other reason to look at JCJ/VIX.  Since SPX is negatively correlated with VIX (over short timeframes) you might want to chart SPX versus 1/VIX to show a divergence.  I do this on a daily chart with one minute bars.

VIXIn this case, using JCJ/VIX might be useful, but you still have to run a second chart to see which one is causing the divergence.  The short answer is, look at volatility and look at correlation, but don’t combine them.

Posted in Indicators | Tagged , , | Leave a comment

Long Term Chart Analogues

I saw this chart again on Stock Twits, an old favorite.  It’s due to fellow Canadian Dr. Jean-Paul Rodrigue.  The ramp, the “mania phase,” and the double top reminded me of the NASDAQ bubble I posted earlier.

BubbleChartA freehand chart like this is a good way to illustrate market psychology without being tied down by actual cases.  I did the same thing when I presented the H&S pattern way back at the beginning of this blog.

I like the way Rodrigue’s chart shows an accumulation phase, then public attention, and finally reversion to the mean.  Here is Dr. Flumiani’s chart, after Livermore:

LivermoreLivermore applied this model to speculation in individual stocks, not (necessarily) the general market.  We call his cylinder a “coil” today, both terms attributing a third dimension to the chart.  Legend has it that Livermore went short at the top in 1929.

Both models are well supported by the dotcom crash, below.

DotComBubbleHere we see a clear accumulation phase, just like Livermore’s cylinder, then consolidation below 2900.  The gap up through 2900 and then the round number 3000 brought in the public, and set off the “mania” phase.  All three charts have that second peak which is the final clue before the crash.

This is not a pattern I actually trade.  Marcel Link, in his book, discusses the psychology of trying to catch singular events.  I just put up the charts because they’re interesting.  Tom McClellan has found a number of long term pattern analogues, like this one:

HysteriaThe first time I saw this chart, I thought it was nonsense.  You can always line up today’s bull market with another bull market from the past, but Tom makes a pretty good case.  I still don’t think it’s a guide for timing, though.  If you want to do that, I recommend the O’Neil method or the ADX method I posted before.

Posted in Patterns | Tagged , , | Leave a comment