Last week was a lesson on the power of expectation in the stock market. The first ten days of July were very bearish with the S&P 500 appearing to break the neckline of a bearish technical head-and-shoulders pattern, thus forecasting a new leg lower. Investors big and small had placed bets on a market decline moving into earnings season with the expectation that earnings results and guidance would disappoint. Essentially the argument was that mediocre earnings that were just "less bad" had already been priced into the market with the second quarter rise in stocks. It would take truly impressive results to move stocks higher and with fears mounting that the economic recovery was still in question no one was expecting any earnings fireworks.

The exception was Goldman Sachs (GS). Everyone expected GS to beat Wall Street's estimates. Yet no one expected the truly momentous quarter that Goldman generated. The company delivered a profit of $4.93 a share compared to the $3.54 estimate. I won't bore you with details but this earnings report last Tuesday really kicked off a week of bullish surprises. Wait, let me correct myself. Actually it was the Meredith Whitney upgrade of GS last Monday and her short-term bullish call on banks is what really started the rally and caught investors off guard. It was several weeks ago Whitney shared her very bearish views on the banks and how investors shouldn't trust any second quarter earnings results because they were essentially fake. Thus a few pundits were pretty skeptical of Whitney's call on GS and the banks immediately in front of earnings season and with the S&P 500 hovering around support.

The unexpected bullish reversal by Whitney on the banks was like a lightning strike that started a brush fire during a heat wave in summer. Soon the fire turned into a raging inferno fueled by upside surprises in GS, Intel (INTC), IBM, J.P.Morgan (JPM) and more. With the crowd going into the week with a bearish bias there was a massive short-covering rally that lifted the market to one its best one-week gains in years both here and in Europe. Last week I said that stocks might bounce on earnings news but expect it to roll over into a new lower high. It is common for the bearish head-and-shoulders pattern to produce a second right shoulder. That did not happen. The violent rally may have been due to it being an option expiration week, which could have exacerbated the volatility but stocks raced past the right shoulder to new relative highs.

Now we're left with a stock market that is short-term overbought, facing heavy overhead resistance, and 80% of the S&P 500's earnings reports are still to come. If you're a fund manager do you go long the market here? The S&P 500 is still in a trading range with support in the 880-875 zone and resistance at 950. A breakout over 950 would be very bullish and stocks would probably see a quick rally toward round-number, psychological resistance at 1,000. Meanwhile earnings results tend to be strongest at the beginning of earnings season and deteriorate throughout the second half. On top of that the third quarter tends to be the weakest time of year for stocks. Seasonally we're in the worst six months of the year for the market and the worst four months of the year for technology. Yet some of these historically seasonal trends are not working. The tech-heavy NASDAQ is breaking out to new highs for the year.

Daily chart of the S&P 500:

Monthly chart of the S&P 500:

Daily chart of the NASDAQ Composite:

Weekly chart of the NASDAQ Composite:

The short-term trend in stocks is now up. I do expect the S&P 500 to rally toward resistance at 950. Yet how many traders are going to start betting on a failed rally and begin shorting stocks at resistance? If the S&P 500 breaks out past 950 we can bet on more short covering and probably some real buying as money managers struggle to beat their benchmarks. I decided to look at some key sectors to see if they held any clues to the market's strength and whether or not this new rally has future. Traditionally Dow Theory suggests that we can't have a sustainable market rally without the transportation sector. Looking at the transportation index ($TRAN) we see a key breakout over significant resistance at 3200, where the 50-dma and 200-dma converged. Yet the index failed to breakout past its right shoulder and it remains under heavy resistance at the 3400 level. I think one sector to watch inside the transports is the railroads. The DJUSRR railroad index did breakout to new relative highs. If this group stays strong it could lead the transports higher.

Chart of the Transportation index:

Chart of the DJUSRR railroad index:

The next group I looked at was the financials, more specifically the banking indices. The banks are what led us lower during the bear market and they're the group that led us higher out of the March 2009 low. You'll notice that the BKX banking index and the BIX banking index both saw their rallies stall at the 200-dma on Wednesday and they've been unable to breakout above this technical resistance. If this sector can breakout from here then this rally has a good chance of staying alive. However, what can the next round of bank earnings say that hasn't already been said by JPM, GS, BAC and Citigroup?

Chart of the BKX banking index:

Chart of the BIX banking index:

The next sector I looked at was the semiconductor sector. Intel's earnings last week were much better than expected and it fueled a huge move in the SOX semiconductor index. Intel's comments about a potential bottom for the PC market were bullish and definitely a feather in the cap for bulls claiming the worst is behind us. Usually the semis tend to lead the NASDAQ and it was especially true last week. Both the SOX and the NASDAQ rallied to new highs for the year. Yet the gap higher in the SOX worries me. It is very uncommon for the SOX to gap open and these gaps almost always get filled. The trend is up for the sector but that doesn't mean investors have to chase this move.

Chart of the SOX semiconductor index:

The next area I looked at was oil and the U.S. dollar. Last week I wrote that oil would eventually bounce. That bounce appeared near the trendline of higher lows. You can also see it near the 100-dma on the USO oil ETF. Fundamentals for oil remain shaky. Demand is relatively weak and inventories are high. It will take new data that the global economy is really improving to keep the bullish trend alive. Oil bulls were happy to hear that China's second quarter GDP, just announced last week, came in at a +7.9% growth rate. Keep in mind that China's economy is also enjoying an astronomical 4 trillion yuan ($585 billion) government stimulus package. Hopefully the stimulus can keep the Chinese economy running long enough for the rest of the world to catch up and return to growth. The Chinese Shanghai stock market closed near 13-month highs on Friday. Jumping back to the U.S. dollar, it looks like the dollar is breaking down from its six-week consolidation. This should be bullish for oil, gold, copper and the rest of the commodity sector. If the commodity rally returns it would be one more leg for the wider market's rally to stand on.

Chart of the USO:

Chart of the UUP (U.S. dollar ETF):

A week ago I was in the camp expecting a breakdown. Today I am reluctantly and very cautiously bullish. Yet I would not want to chase this move in the market and I would not want to launch new positions with the S&P 500 still stuck under resistance at 950. I suspect that the healthiest scenario would be to see the S&P 500 consolidate under 950 for a couple of weeks and slowly build enough steam for a breakout higher. If stocks continue to climb at their current pace the move is unsustainable and the correction would probably be just as sharp. Something to keep in mind as we move forward is the retail sector. Consumers remain very week and we're going to start hearing more talk about the back-to-school shopping season. Right now expectations for back-to-school are not very high and this could forecast another skinny fourth quarter and holiday shopping season.

~ James Brown