Looking at the returns of the S&P 500 for both January and February, there's a surprising standout -- technology. As of March 13, tech was down just 3.1%, while the S&P 500 was down 15.7%.

In the last bear market, from 2000 to 2002, of course, the last thing you wanted to have in your portfolio was tech. This time, clearly, the albatross has been the financial sector -- down over 35% year to date. Spectacular failures of management to run banks in a responsible manner have occurred throughout the industry.

With technology, though, it makes little sense for one of the most economically cyclical sectors of the economy to be doing so well if the recession is deepening. So, that makes me question my assumptions: Either the recession is not deepening, or there is something else going on here. Let's investigate.

It's all in the large caps
Just like the Nasdaq 100 index, the S&P 500 technology sector is market-capitalization based -- meaning a few large stocks have a disproportionate weight on the sector. (That's part of the reason the index has performed so well this year.) In the case of the S&P 500 technology sector, the stocks with the largest weightings are IBM (NYSE:IBM), Cisco Systems (NYSE:CSCO), and Microsoft (NASDAQ:MSFT). These stocks are so mammoth that if they do well, they pull the whole sector with 'em.

They are now defensive
I never thought I would say this, but the tech sector is now defensive. Compared with toxic assets or CDOs, it is relatively easy to figure out what is going on in the router market or the microprocessor market.

The secret to the relative outperformance of companies like Apple (NASDAQ:AAPL), Google (NASDAQ:GOOG), and Intel (NASDAQ:INTC) isn't that much of a secret. According to Jefferies, a basket of those three stocks plus Microsoft, Cisco, and Qualcomm (NASDAQ:QCOM) sports $18.7 billion in cash on average, compared with $1.8 billion in debt. The corresponding average for the S&P 500, excluding financials, is $1.8 billion and $5 billion, respectively.

As I have written before, in a deflationary environment, the value of debts stays constant, but the value of assets (and revenues, for that matter) declines. Therefore, only companies with strong balance sheets and a lot of cash can thrive in a deflationary environment. Some of our biggest technology companies fit that bill.

Not your father's tech giants
Hewlett-Packard and IBM are two old behemoths that have managed to reinvent themselves. Remember those great Thinkpads and IBM PCs? They're now made by China-based Lenovo; IBM sold that business years ago. IBM is now much more of a defensive stock -- IBM's service revenues are a lot more reliable than its manufacturing operations.

For instance, Big Blue is pushing cloud computing, which is becoming popular as IBM's customers become more efficient by abandoning their own servers in favor of external data centers run by IBM. This locks customers into long-term agreements and makes IBM's revenues recession-resilient. Also, the company has been expanding in software, which carries huge profit margins.

Hewlett-Packard, on the other hand, is a hardware giant, but it too is expanding into services. It bought EDS a couple of years ago and now is ranked second in computer services -- only to IBM. Being a services company does not sound very exciting, but it certainly pays the bill in the present environment.

So with healthy balance sheets and a safe distance from the troubles that have plagued financials, some big-cap techs are now defensive stocks. How about that?

More on tech:

Fool contributor Ivan Martchev does not own shares in any of the companies in this story. Microsoft and Intel are Motley Fool Inside Value recommendations. Apple is a Stock Advisor selection. Google is a Rule Breakers selection. Try any of our Foolish newsletters today, free for 30 days. The Motley Fool owns shares and covered calls of Intel and has a disclosure policy.