If last week was about selling energy and materials to buy tech, this week was the mirror image.

In a seemingly illogical turn of events, the tech sector stumbled despite strong earnings from several bellwether companies, while energy was the best-performing sector amid plunging oil prices. The sum of the parts was a lot of volatility, investors getting the usual jitters about earnings, and blue-chip indices and bond yields that were flat on the week. The Nasdaq Composite, conversely, did not emerge unscathed.

Apple ( AAPL) led the Nasdaq to a new six-year high last week, and just as swiftly led the index's 2.1% plunge in this round. Enthusiasm for the iPhone faded as investors gathered anxiety about CEO Steve Jobs and the government's investigation into options backdating. Shares of Apple fell 7.6% on the week. Investors also debated the strength of Apple's midweek earnings report. The company beat estimates but provided its usual dose of conservative guidance.

The same was true for Intel ( INTC), which also beat earnings estimates earlier this week, yet warned that its profit margins would be stunted throughout 2007 due to its price war with competitor Advanced Micro Devices ( AMD). Shares of Intel and AMD fell 5% and 12.1%, respectively. IBM couldn't catch a break, despite an impressive quarter as well. Big Blue's shares slid 2.5% on the week, and Cisco's ( CSCO) fell 6.7%.

"Tech makes a seasonal peak between the 15th and the end of January, after Intel reports its news," says Jeffrey DeGraaf, chief technical analyst at Lehman Brothers. But DeGraaf believes these stocks are still good long-term investments, and adds that better entry points might come later in the first quarter. His research shows that most investors are still underweight technology, and that the seasonal weakness will lead to a more deeply oversold situation.

DeGraaf says stocks like Cisco, IBM Microsoft ( MSFT), Oracle ( ORCL) and Novellus ( NVL) show "great long term charts"; in other words, they are trading in a range that provides a solid base for future returns. "These bases are very symptomatic of what happens after a bubble," he says. "There is a five- to eight-year window where stocks go dormant and start to revive in the seventh year."

The earnings agita will pass, says James Paulsen, chief investment strategist at Wells Capital Management. "Tech companies have been doing this for the entire decade," says Paulsen. "They report earnings numbers that are pretty good, but give cautionary comments. Then the next quarter turns out to be pretty good anyway." It's the flip side of what the tech CEOs were doing in 1999, says Paulsen, "when they'd say 'earnings are a bit light, but the future looks fantastic.'"

Indeed, the future for tech may be better than the guidance suggests. The technology sector is expected to provide the strongest earnings growth of 2007, says John Butters, an analyst at Thomson First Call.

Meanwhile, the energy sector, which is expected to show the least profit growth this year, had a strong week.

Traders spent their days trying to time the bottom in the price of oil, and many felt that Thursday's brief slide below $50 per barrel was the jackpot. Oil futures rallied Friday to end the week up 11 cents at $51.99.

Fueled by stronger-than-expected earnings from oil services company Schlumberger, shares of the Oil Services HOLDRs Trust ( OIH) gained 4.9%. Shares of Schlumberger gained 5.4% Friday on the heels of its earnings report. The Energy Select Sector SPDR ( XLE) exchange-traded fund also jumped 4.6% this week.

Exxon Mobil's ( XOM) shares gained 3.7% this week to help stabilize the Dow Jones Industrial Average, which was pressured by earnings-related drops.

Economic bellwether General Electric ( GE) couldn't wow investors with its earnings Friday, despite doubling its profits. Investors honed in on the company's restatement of earnings going back to 2001, as well as concerns about its acquisition strategy. Shares of GE were the worst-performing in the Dow on Friday, falling 2.7%.

The Dow slipped a fraction Friday and ended the week up only 9 points to close at 12,565.53. The S&P 500 finished the week down less than a point on the week, to close at 1430.50.

The week's economic data were strong all around, with a higher-than-expected industrial production and capacity utilization report, rising housing starts and building permits, and another week of declining jobless claims. Headline inflation reflected higher energy prices a few months ago, but the core readings were benign. Federal Reserve Chairman Ben Bernanke testified in front of the Senate Budget Committee, but said only one thing about the current economy: that the industrial production numbers this week show strength in the manufacturing sector. An upturn in the Philadelphia Fed Manufacturing Index helped prove his point.

On all the good news, the fed funds futures market continued to push out the likelihood of a rate cut well into the second half of the year. With all this acceleration, odds of a rate hike even crept into the conversation.

Stock investors have accepted the rate outlook at this point, but bonds were still adjusting. The sum of the parts was an unchanged 4.77% yield on the 10-year on the week. Foreign buyers and large institutions stepped in to buy longer-dated Treasury bonds when yields neared 4.8%.

Within the walls of a single week, the markets got rather volatile. A trader might have made a nice bundle shorting oil to $50 and buying it again. And tech may have been ugly this week, but the Nasdaq is still up 1.5% for the year -- which is only three weeks long at this point. Likewise, the S&P 500 and the Dow are up 0.9% and 0.8% for the year. Annualize that!

RealMoney Barometer Poll

1 What would best describe your stance heading into the coming week of trading?
Bullish
Bearish
Neutral
2 Which of these sectors do you think is set to move up in the coming week?
3 Which of these sectors do you think is set to move down in the coming week?

View the results without voting

In keeping with TSC's editorial policy, Rappaport doesn't own or short individual stocks. She also doesn't invest in hedge funds or other private investment partnerships. She appreciates your feedback. Click here to send her an email.

More from Opinion

It's Just Not Smart For Investors to Ignore the Threat of a Trade War

It's Just Not Smart For Investors to Ignore the Threat of a Trade War

To Think a Trade War's Still Just a Threat Is the Dumbest Thing on Wall Street

To Think a Trade War's Still Just a Threat Is the Dumbest Thing on Wall Street

Flashback Friday in Politics: Trade Wars, Manafort, Immigration Dominate Minds

Flashback Friday in Politics: Trade Wars, Manafort, Immigration Dominate Minds

Microsoft and Sony's Rumored Game Console Plans Bode Well for AMD

Microsoft and Sony's Rumored Game Console Plans Bode Well for AMD

Apple Supplier Jabil Is Tumbling, But Its Sales Momentum Remains Strong

Apple Supplier Jabil Is Tumbling, But Its Sales Momentum Remains Strong