Category Archives: Technical Analysis

“Technical analysis” looks at the markets from a purely mathematical and statistical view point. It has nothing to do with fundamental analysis. While we derive our long-term view from the latter, technical analysis can help determine medium-term strategy.

Technical analysis February 8, 2012

Time to take a look again at the technical picture of the S&P 500 Index, which seems to be in a nice uptrend, undeterred from anything:

If only the volume was increasing (usually, higher prices are met with higher volumes as more investors are willing to part with their shares and buyers have to “eat” through their offers).

Stocks can trade above or below their moving averages. One thing is sure: they always come back to their average (or the average follows). The more stocks are trading above their average, the stronger the trend. However, this cannot go on for eternity, and gravity eventually sets in.

We measure the percentage of stocks within the S&P 500 Index (red) trading above their averages of the past 3, 5, 10, 20, 50 and 200 trading days (various shades of blue). The current data:

Moving average / % above (maximum since 8/2010)

3 day: 50% (98%)
5 day: 73% (99%)
10 day: 77% (98%)
20 day: 81% (96%)
50 day: 88% (94%)
200 day: 79% (94%)

The combined chart looks like this:

You can also measure the number of days these indicators (20, 50 and 200 days) remain above a certain level (80% or 90%). This gives a feeling for the “aging” of a rally:

 

And same for 90 days:

 

You can picture these lines like thin plants, growing longer and longer until a big wind pushes them over. The longer they grow, the more susceptible they are of being blown down. But if no storm happens, they keep growing. I gave the “plants” 5 days of “growing pause” (when they briefly dip below 80% or 90%) before I reset the counter to zero.

The number of days where 80% of stocks are above their 50-day moving average (upper of the two charts, medium blue lines) usually ends when the “plant” reached between 15 and 35 days. The current plant is 16 days old.

There is also a black plant (days where 80% or 90% of stocks are above their 200-day moving average). It is a rare plant, growing only in very strong bull markets (like September 2010 to April 2011). So far no “black plant” has been sighted. This serves as a warning that the current bull market could in fact run much further than most people (including me) anticipate.

On the other hand, “black plants” have usually “died” before the bull market dies.

The reason you might have never heard of this indicator is because I just invented it. A bit nerdy, but helps visualizing the age and stage of bull markets. Back to more “traditional” measures:

Percentage of stocks with RSI (relative strength index) below 30:

The current reading of 9% is pretty low (min-max = 4%-47%). The market is definitely not oversold.

Now to the opposite: percentage of stocks with RSI over 70:

The index is approaching its all-time record (17). This does not mean the market will crash (see November 2010), but that it is at least prone for a pullback.

Next up is the average RSI of all stocks in the S&P 500 Index:

The current reading is at record high (60%). Doesn’t mean the market cannot go higher, but the air is getting thinner.

Next: the famous put-call ratio (here: equity options only, 20-day moving average):

The current value of 0.59 I would grade as neutral to slightly bullish (the more calls relative to puts are being traded, the more bullish investors are). Inconclusive (since not at an extreme).

Stocks making new 50-day highs are a good sign. However, if there are too many, it is a counter-indicator. Subtracting the percentage of stocks making new lows from the number of stocks making new highs delivers the following chart:

The current value of +20 is close to the record (+23) and can be considered “ripe for a correction”.

Moving on to the Nasdaq Advance-Decline-Line (cumulative difference between rising and falling stocks):

The Advance-Decline-Line does not confirm the recent 52-week high marked by the Nasdaq index, which is usually a worrying sign (few stocks are carrying the index higher while the majority of stocks is not following). There is no classic divergence yet (where index rises and AD-line falls, but it should be watched.

The Nasdaq new highs/new lows index has not confirmed a bull market until the beginning of the year, as it continued to decline while stock prices rose:

This is the single-best indicator I have come across, and I am worried (about our short positions) since it has recently turned positive.

A different way of looking at new highs versus new lows is to calculate the ratio between the two:

The ratio currently stands at 5, so still has room before reaching its former maximum (22). It indicates the uptrend being intact, but might run out of steam in 4-8 weeks.

After applying standard deviation analysis to each indicator and weighing them by how well they have historically done we get the following “old” LIMTI (Lighthouse Timing Indicator):

The current reading of -7 is pretty close to its worst level (-10) and indicates danger of a pull back.

However, the “new” Lighthouse Timing Index is in neutral territory. It uses deviation from moving averages, but has not “behaved” well since August 2011. I might have to fine-tune it again:

Index history currently goes back only 18 months as the data collection is pretty time-intensive. It is still work in progress.

CONCLUSION:

The current market is short-term trading in thinner air, but it doesn’t look like the medium-term uptrend is about to end.

I will look at sentiment indicators next in order to decide if short positions have to be reduced (or mitigated via call options).

 

Improving LIMTI

The efficacy of both technical and fundamental analysis is disputed by efficient-market hypothesis (which states that stock market prices are essentially unpredictable). If stock prices were unpredictable, my clients would be wasting money.

“Technical analysis” tries identify patterns that help determine future prices. You might ask “how can a formula know what happens in the future”? That is a good question. I don’t think such formula exists. However, it is not the event, but rather the stock market reaction to it that counts.

Example: usually the onset of war is a bad event for stock markets. The invasion of Kuwait by Iraq in 1990 let to the build-up of Operation Desert Storm. Global stock markets anticipated a war and sold off quite dramatically. But when fighting finally began on January 17, 1991, stock markets “exploded” to the upside; the S&P 500 index rose from 316.17 (January 16) to 332.23 (January 18) and later on to 370.47 (March 1), an increase of 17%.

There seem to be situations where investors “anticipate” events and where rational behavior (sell when war breaks out) might lead to irrational results (miss a stock market rally).

Now on to technical analysis.

You can measure multiple things that make sense. For example, you could look each day how many stocks rise versus how many decline, and add the difference to an arbitrary starting point (i.e. 10,000). It would look like this:

I prefer Nasdaq since there are less fixed-income related listings (that have nothing to do with the stock market and could distort the result). The blue line is a 10-day moving average (mavg) (to iron out daily noise). The brown line is a 30-day mavg of the blue line to determine the trend. A rising line means: on average, more stocks are rising than falling. This is important for the markets “breadth”. A thin breadth means that the major stock market indices are still rising (or falling), but driven by only a few stocks (while the majority already moves in the other direction).

In the above chart you see the advance-decline line peaking in early 2011. That is when the overall stock market (red line) entered a sideways pattern. The sell-off in August was accompanied by further decline in the advance-decline line. This is a confirmation of the trend.

You can use this information for a timing indicator. I give positive points for a positive slope of the 30-day mavg (rising) and for times where the blue line is above the brown line.

This, of course, is only one indicator.

A slight variation of the advance-decline line look at the daily ratio of stocks making new 52-week highs divided by number of stocks making new 52-week lows. Those numbers “flutter” a lot, so you need longer moving averages (20 and 50 days) to get the noise out. It is a similar picture:

I include the slope of the brown line (positive = good) in our timing indicator.

Better yet from a timing prospective seems to be the following indicator: each day, we look at the number of stocks making new 52-week highs and new 52-week lows and add the difference to an arbitrary starting number:

The blue line does not need any “smoothing” and peaks pretty much at the same time as the stock market. I use a 30-day mavg as a “trigger” line, awarding positive points for positive slope and for the blue line being above the brown line.

There are other indicators which are a bit more problematic, because they can have their own trend. It is hence impossible to say that a reading of X is overbought or oversold. One remedy is to lay a trend line (moving average) through the indicator, then calculate the difference of the indicator to its trend line:

Above you see, in bold green, a 20-day mavg of the percent of stocks within the S&P 500 index trading at a 5-day relative strength index (RSI) of less than 30. It bottoms at 30 in August 2010, but at 47 in August 2011 (left hand scale is inverted). So we have to lay a trend line (dotted green) and calculate the difference:

I chose a 60-day mavg for the trend line (= 3 calendar months with 20 trading days each) since the market seems to have a certain pattern of peaks and bottoms every 3 months (peak in November 2010, February 2011, May 2011, August 2011).

This indicator seems to give a false signal at big trend reversals (September 2010), but is pretty good at signaling swings in a sideways market. Interestingly, the measure gave a big alert to sell during the meager recovery of the S&P 500 index in September.

Another indicator needing trend adjustment is the put-call ratio (number of put option contracts traded divided by number of call options traded):

Even the trend-adjusted indicator has its limitations, and hence gets a low weighing in the overall timing indicator.

For short-term timing purposes I find the following indicator useful:

Basically, you measure the percentage of stocks within the S&P 500 index trading above their own moving averages. You chose different periods (3, 5, 10, 20, 50 and 200 days), and the above chart is what you get.

You will realize the short-term indicators move faster and are more volatile than the longer-term ones. But it seems that when all of the indicators are near zero (for example around August 10th) the stock market (red line) “cannot” go much lower. Conversely, when most indicators are at high levels (July 20), the stock market is likely to go down.

You can get a bit more order into that “spaghetti” chart by averaging those indicator in three groups: short (3, 5 days), medium (10, 20 days) and long term (50, 200 days):

Or even average them into just one:

There are some more indicators I do not want to bore you with here. Assigning values for overbought and oversold conditions, then weighing the results and adding them up leads to the following “new and improved” LIMTI (Lighthouse Investment Management Timing Indicator):

Worryingly, the indicator is showing a more overbought level than in July (before a major sell-off). This would suggest another large downwards movement in the equity market is lurking ahead.

Due to short-term “exhausted” downward momentum I could imagine the market to catch its breath for a couple of days before resuming a negative trend.

I will post updates on the “new and improved” LIMTI as well as some of the interesting sub-components.

What a week

Looking at asset class performance during the week August 1-5, 2011:

Horrible week for the Dax index, US REITs (Real Estate Investment Trusts) and Emerging Markets. I had wondered why the Dax managed to perform so well despite Euro zone troubles. It is a pretty cyclical index, and usually outperforms the US indices – in both directions. Foreign investors make up a larger percentage. Hence in a crisis, when large international investors recoil towards their home markets, the selling hits the Dax more than, for example, the S&P 500.

Let’s look at US equity sectors:

As you would expect, cyclical sectors (-9%) underperformed defensive sectors (-5%). Mid caps (-10%) did worse than small caps (-9%) and large caps (-6%). Somehow surprising is the fact that value stocks (-7%) did not do better than growth stocks (-7%). This is an effect often observed in a crash: investors anticipating a slow down in the economy shifted into defensive sectors, making them more expensive relative to its own history and the market average. In a global sell-off, they feel the same brunt.

Gold and stocks love inflation, right?

In theory, stock prices react positively to inflation. You can explain that with the balance sheet effect: while debt remains same in nominal terms, assets gain in value (with the difference showing up in the equity position via net profit).

Gold should also benefit from inflation as the supply of precious metals is limited – hence they will go up in price if money supply increases.

Taken together we should assume that gold and stocks are positively correlated (if one moves up, the other one does the same).

Let’s look at rolling correlations (40 and 80 days) between GLD (gold ETF) and SPY (1/10 S&P 500 Index ETF):

In the above chart you will see that correlation actually varies wildly (between -0.6 and +0.9).

A major change into positive territory ensued after Ben Bernanke announced QE2 (Quantitative Easing round 2) in a speech on August 27, 2010. This was clearly positive for both stocks and gold, since the economy was supposed to be stimulated by printing money.

The subsequent break-down in correlation into February 2011 could be explained by the fact that, despite quantitative easing, inflation remained somewhat contained in the United States.

Recent weakness in marco-economic indicators took a toll on stocks while gold managed to reach new record highs. The reasoning could be that the worse the economy gets, the more likely the Federal Reserve Bank will unleash more quantitative easing.

As long as the stock market does not show signs of serious trouble the Fed seems unlikely to act; the current “decoupling” (negative correlation) is therefore expected to continue for the time being.

 

Sector momentum table 2011-07-15

Each week we test major asset classes for the strength of their momentum. We check:

  1. is current price above 20-day moving average?
  2. is current price above 50-day moving average?
  3. is 20-day moving average above the 50-day moving average?
  4. does the 20-day moving average have a positive slope (i.e. is it rising)?
  5. does the 50-day moving average have a positive slope (i.e. is it rising)?

If the answer is yes, we give one point. If all conditions are fulfilled then the asset class has five points. This is considered a very strong momentum. Investors believing in strong trends would invest in assets showing a strong (positive) momentum.

We also track weekly price change (%) and the change in points.

Here is the latest table:

Observations:

  • Financials, Home Builders and Industrial stocks were the weakest.
  • Energy, Consumer Staples and Utilities fared best.
  • Large caps slightly outperformed small and mid caps.
  • Defensive sectors clearly outperformed cyclical sectors.
  • Little difference in growth versus value was observed.
  • Overall stock market momentum increased slightly; many individual sectors however do not look healthy as they lost considerable momentum.
Conclusion:
  • Momentum-oriented investors would be advised to overweight defensive sectors except for Healthcare (which had quite a break-down in momentum over the last week).

Asset momentum table 2011-07-15

Each week we test major asset classes for the strength of their momentum. We check:

  1. is current price above 20-day moving average?
  2. is current price above 50-day moving average?
  3. is 20-day moving average above the 50-day moving average?
  4. does the 20-day moving average have a positive slope (i.e. is it rising)?
  5. does the 50-day moving average have a positive slope (i.e. is it rising)?

If the answer is yes, we give one point. If all conditions are fulfilled then the asset class has five points. This is considered a very strong momentum. Investors believing in strong trends would invest in assets showing a strong (positive) momentum.

We also track weekly price change (%) and the change in points.

Here is the latest table:

Observations:

  • Huge discrepancy in performance between stocks (down 2-3%) and precious metals (up 3-10%).  Precious metals driven by Fed Chairman Bernanke’s hint at further money printing.
  • Risky fixed income (high yield, junk) fared worse than “risk-free” (Treasuries, TIPS).
  • Euro lost further ground, while Swiss Franc/USD reached a new high.
  • Momentum deteriorated for stocks, while improving for most commodities and treasuries as well as Swiss Francs and Yen.
Conclusion:
  • A momentum-oriented investor would invest in Treasury bonds, Swiss Franc and Gold. The Euro, Oil, and emerging market stocks should be avoided.
I also would like to point out the continued bad performance of the financial sector (here relative to the S&P 500 Index):

Sector momentum table 2011-07-08

Each week we test major asset classes for the strength of their momentum. We check:

  1. is current price above 20-day moving average?
  2. is current price above 50-day moving average?
  3. is 20-day moving average above the 50-day moving average?
  4. does the 20-day moving average have a positive slope (i.e. is it rising)?
  5. does the 50-day moving average have a positive slope (i.e. is it rising)?

If the answer is yes, we give one point. If all conditions are fulfilled then the asset class has five points. This is considered a very strong momentum. Investors believing in strong trends would invest in assets showing a strong (positive) momentum.

We also track weekly price change (%) and the change in points.

Here is the latest table:

Observations:

  • Not much divergence to report other than weak financials and home builders while technology and materials outperformed.
  • Small caps outperformed large caps.
  • Growth outperformed value.
Conclusion:
  • Momentum across all sectors still pretty good. Albeit none shows the 20-day moving average above the 50-day moving average.
  • Still unconvinced this low-volume rally can be sustained. Would recommend focusing on defensive sectors (if at all).

Asset momentum table 2011-07-08

Each week we test major asset classes for the strength of their momentum. We check:

  1. is current price above 20-day moving average?
  2. is current price above 50-day moving average?
  3. is 20-day moving average above the 50-day moving average?
  4. does the 20-day moving average have a positive slope (i.e. is it rising)?
  5. does the 50-day moving average have a positive slope (i.e. is it rising)?

If the answer is yes, we give one point. If all conditions are fulfilled then the asset class has five points. This is considered a very strong momentum. Investors believing in strong trends would invest in assets showing a strong (positive) momentum.

We also track weekly price change (%) and the change in points.

Here is the latest table:

Observations:

  • After a huge rally into the end of the quarter equity markets went more or less sideways compared to a week ago.
  • Of particular interest is the strong performance of commodities, led by copper and precious metals (however not joined by oil).
  • US Treasuries recovered from a sell-off, mirroring moves in the equity markets.
  • The Euro stands out as the largest loser as fears regarding Italy’s debt and banks spread on Friday.

Conclusion:

  • Momentum has improved for commodities and generally anything related to risk.
  • The Euro, Silver, CRB commodity index, oil, US treasuries show weakest measurement of momentum
  • I am willing to go out on a limb and say that the recent rally was end-of-quarter window-dressing and / or short-covering. Normally you would expect to see increasing volume with rising equity prices. This has not been the case:
Before reversing my cautious stance on equities and the Euro as well as long-positions in US treasuries I would need to see new highs in the S&P 500 index for the year (1,370) combined with decent volume.

Sector momentum table 2011-06-24

Each week we test major asset classes for the strength of their momentum. We check:

  1. is current price above 20-day moving average?
  2. is current price above 50-day moving average?
  3. is 20-day moving average above the 50-day moving average?
  4. does the 20-day moving average have a positive slope (i.e. is it rising)?
  5. does the 50-day moving average have a positive slope (i.e. is it rising)?

If the answer is yes, we give one point. If all conditions are fulfilled then the asset class has five points. This is considered a very strong momentum. Investors believing in strong trends would invest in assets showing a strong (positive) momentum.

We also track weekly price change (%) and the change in points.

Here is the latest table:

Observations:

  • Momentum remains very weak across all sectors
  • Defensive sectors such as Consumer Staples, Health Care and Utilities each lost 1 point
  • Home Builders gained one point due to strong performance, but this could be short-lived
  • Large caps declined while mid- and small-caps slightly advanced
  • Cyclical sectors performed better than defensive sectors
  • Value slightly underperformed growth

Conclusion:

  • Momentum-oriented investors should abstain from going long any sectors of the stock market.