The Average Investor's Blog

A software developer view on the markets

Archive for September, 2011

S&P 500 unlikely to end September above its 10-month moving average

Posted by The Average Investor on Sep 30, 2011

To close above its 10-month EMA, the S&P 500 needs to close above $1,267.79 (for more details see this previous post), which is more than 9% above today’s close. The trigger point is even higher using the 10-month SMA. Thus, no buy signals base on this strategy unless there is monstrous positive news tomorrow. Not suggested by the futures either … 🙂

Posted in Market Timing | 1 Comment »

The Weekly Update

Posted by The Average Investor on Sep 25, 2011

The bear market grind continues slowly. The world markets have suffered pretty severe losses and it is hard to think of events that can radically change this course. Most world indexes have suffered losses of more than 16%, which is the definition of a bear market I use, and most of them, but excluding the S&P 500, have suffered losses of more than 20% – the more common definition of a bear market. And don’t forget, this is on top of the fact that we never reached the peaks of 2000 and 2007, a very, very bleak picture in my opinion. According to, the S&P 500 is 40% on inflation adjusted basis from the peak in 2000 – talk about wealth destruction!

On top of everything, the officials in charge seem to have less and less clue what to do. Just consider: the Fed chairman apparently is seeing serious down risks to the economy, less than two months after he was expecting a higher growth in the second half! Hello, if their horizon of predictions is so unreliable – why do they control the interest rate? I won’t even comment on Europe – it’s a shame!

Back to trading. This article confirms that my interpretation of Jack Schannep’s version of the Dow Theory was correct and indeed we got a buy signal in late August, which was not a buy signal according to the more conservative interpretations. At least one of the two other Dow Theorists, Richard Russell, is for sure making a big noise of the non-confirmation between the Dow Jones Industrials and the Dow Jones Transports, so I am curious to see who will end up with a better entry this time.

The ARMA strategy is down 2% for 2011. So far, the record 13% fall in August is followed by about a 1.5% gain in September. The SPY (S&P 500 ETF) for Monday is long. 🙂

Posted in Market Timing, Trades | Leave a Comment »

A C++ macro to find offsets of structure members

Posted by The Average Investor on Sep 23, 2011

A few large structures dumped in hex, how does one find the offset of a member to look up the corresponding value in the hex dump? That’s what I was dealing with recently. Came up with the following neat macro:

#include <iostream>

// Just for the example
#include <stdio.h>

using namespace std;

#define STRUCT_OFFSETOF( ss, mm )   \
   cout << #ss <<                   \
   "::" <<                          \
   #mm <<                           \
   ": " <<                          \
   dec <<                           \
   offsetof( ss, mm ) <<            \
   " (0x" <<                        \
   hex <<                           \
   offsetof( ss, mm ) <<            \
   ")" <<                           \

main( )
   return 0;

Posted in C++ | Leave a Comment »

The Weekly Update

Posted by The Average Investor on Sep 4, 2011

September started with a bang on the downside, the S&P 500 down -3.69% in the two trading days, so far justifying the market neutral position established by most moving averages.

The ARMA strategy on the S&P 500 recorded August as its worst month in history (at least going back to 1950) – down -13.1%! There have been only two other occasions when it lost more than 10% in a single month. Still, it’s down about -3.3% for 2011, while the S&P 500 is down -6.65% over the same period of time.

There will be no weekly update next week, it’s vacation time! The numbers to watch for the Friday close are:

Index Crossover Close
S&P 500 $1,254.35
Nasdaq 100 $2,254.69
US REIT (VNQ) $57.82
Emerging Markets (EEM) $44.81

A close above these levels on Friday would mean that the moving average is below the price.

Happy trading!

Posted in Market Timing, Trades | Leave a Comment »

The Monthly Update

Posted by The Average Investor on Sep 1, 2011

After losing 5.72% for the month of August, the S&P 500 ended August below its 10-month moving average and also below its 12-month moving average (using either a simple or an exponential moving average).

S&P 500 and 10-month EMA

The blue line is the EMA, while the two horizontal lines indicate the entry and the exit levels. It is clear that a strategy based on the 10-month EMA would have captured only a small amount of the upside move. The opposite crossover happened 11 months (at the end of September, 2010) ago and a position would have netted about a 6.81% gain. However, the trade turned negative (!) in the middle of the month, but then markets turned up and recovered some of the gains. The next chart zooms into the daily fluctuations for this period.

S&P 500

To me this crossover looks like a delayed whipsaw – it will soon reverse on a higher buy. On the other hand, according to the MarketSci blog, September has consistently been a bad month, so it might be a smart decision to avoid it. Only the future will tell however whether the next crossover is going to be at a higher or lower price.

In any case, considering today’s inflation situation, 6.81% over 11 months is certainly a very decent return. It is hard to deny the success of long term moving average strategies, although I would admit that the 10-month MA extraordinary performance is a mere curve fitting.

August was a really interesting month from the point of view of the Dow Theory. Earlier in the month we got a Dow Theory sell signal. Then, we got what Schannep calls capitulation typical for bottoming markets. Finally, two days ago we got a buy signal again according to the Schannep’s version of the Dow Theory. Notice however that looking at the classical Dow Theory we are still in “out-of-the-market” situation because the Dow Jones Transports average hasn’t confirmed the bull signal given by the Dow Jones Industrials. All in all a very interesting, although a bit scary, month.

Posted in Market Timing | 2 Comments »

%d bloggers like this: