What do a gold stock such as Newmont Mining (NEM) - Get Report, a technology stock such as Komag( KOMG) and an oil-and-gas stock such as Chesapeake Energy (CHK) - Get Report have in common?

They've all outperformed the three major stock indices for the last week or two. And they've all been massively shorted by traders. In fact, it's been buying by investors who are short the stocks and who are buying to cut their losses that has propelled these stocks higher in the last couple of weeks.

The battle between longs -- traders and investors who buy stocks in order to profit when the stock price goes up -- and shorts -- traders who sell stocks that they've borrowed to profit when the stock price goes down -- is always fierce. But right now, it's particularly intense because there's plenty at stake over the next few weeks. And it's the long-vs.-short battle that explains why stocks with nothing in common have behaved so similarly.

Let me start with some numbers that show why this battle is so ferocious. I'll end with some conclusions on what this means for individual investors such as you and me.

I'm going to use hedge funds to explain the dilemma that faced the professional money managers as the fourth quarter began. Hedge funds are a good place to begin. Not because they manage so much money -- just $1.1 trillion, according to Hedge Fund Research of Chicago. Instead, it's because we've got decent data on how individual strategies perform and because the structure of hedge funds puts hedge-fund managers under extreme performance pressures.

Big Money

Hedge funds can be lucrative -- to their managers. The manager collects a fixed fee, usually 1% of assets, or $20 million on a $2 billion fund, and a big cut of any profits, usually 20%. So, if you managed that $2 billion fund in 2004, when the average hedge fund tracked by Greenwich-Van Advisors returned 8.4%, you collected $20 million in fees plus $33.6 million as your cut of the profits (20% of the 8.4% return on $2 billion). Total take for the year: $53.6 million.

Despite that figure, 2004 was a terrible year for many hedge funds. You see, that 8.4% return for the average hedge fund badly lagged the 10.9% return for the

Standard & Poor's 500

index. The folks who give hedge funds money to manage aren't stupid, so a lot of them ended 2004 asking hedge fund managers hard questions about why they should pay these huge fees and still trail a market index.

So how has this year shaped up? Fortunately for hedge-fund managers, the S&P 500 has had a truly crummy year, with a return of just 2.55% for 2005 as of Nov. 17. Unfortunately, hedge funds haven't done a whole lot better. As of the end of October, the average fund was up just 5% for the year.

And some categories of hedge fund actually trailed the benchmark S&P 500 index. Market-timing funds, for example, were down 1.1% for the year.

What would you do if you were a hedge-fund manager, facing restive clients at year-end, with just two months left in 2005 to put some distance between yourself and the index?

The Short Squeeze

From the evidence of the last few months, a lot of money in the market has decided to make big bets on the direction of the market. In October, the big bet was against the energy sector. If you were short stocks such as

Encana

(ECA) - Get Report

or Chesapeake Energy, you scored. Encana dropped 17.2% in October, and Chesapeake Energy fell 9.5%. Big numbers for a single month.

I'm sure those results encouraged more managers to go sell their long positions as October went on, and I'm sure many managers began November short specific stocks or specific sectors.

How do I know? Because the short-interest ratio, a measure of how many shares have been sold short, soared to amazing heights in November for some stocks. The short-interest ratio compares the number of shares sold short with the average daily trading volume in the stock. As the short ratio rises, more and more traders have borrowed stock, betting that the price will fall. At some point, this becomes a contrarian indicator: So many investors have borrowed stock that the slightest upward movement in the stock price will start an avalanche of buying from short-sellers who need to buy stock to return their borrowed shares.

Being long a stock is bad enough: It can go to zero, and a trader can lose every cent ventured. Being short is even worse: Since a stock can keep going up and up forever (well, if it's

Google

(GOOG) - Get Report

, anyway), a short-seller's loss is potentially infinite.

A buying frenzy led by short-sellers who are increasingly desperate to cover their bets is called a short squeeze.

Traders who use the short-interest ratio as a buy-and-sell indicator say, as a rule of thumb, that any stock with a short-interest ratio above 1.5 days is a potential buy because the odds favor a short-squeeze at that level.

By mid-November, many stocks were sporting short-interest ratios well over 1.5 days. On Nov. 11, for example, the short-interest ratio was 2.8 for Newmont Mining, 10.1 for Komag and 1.8 for Chesapeake Energy. These stocks were by no means exceptions. In the technology sector, for example,

Yahoo!

(YHOO)

saw a short-interest ratio of 4.3 and

Marvell Technology Group

(MRVL) - Get Report

(MRVL, news, msgs) came in at 2.6. (All these short-interest numbers are from Phil Erlanger's

Erlanger Squeeze Play

subscription site.)

These high short-interest ratios meant that the market had laid up a lot of fuel. All it took was a spark to set some of it ablaze and send some stocks higher.

Good News Goes a Long Way

And so far in November, that's exactly what we've been getting. The sparks aren't really related to one another, but there was enough fuel in enough sectors to make it seem like the whole market is moving higher.

In technology, high short-interest stocks have zoomed on any news that revenue growth is picking up. So Komag has rallied strongly -- up 6% for the five days that ended with Nov. 18 -- on an analyst report and on comments from

Seagate Technology

(STX) - Get Report

, both saying that sell-through for disk drives in the distribution channel looked strong. Such tepid news wouldn't have moved the stock up so strongly if short-sellers hadn't been betting so strongly against it.

Same for Marvell Technology, this time on solid guidance on revenue and earnings in the company's conference call on Nov. 17. The stock climbed $6.55, or nearly 13%, the next day as 23.6 million shares -- about seven times the average daily volume -- changed hands.

The energy sector has moved up on a lack of more bad news on oil prices, which have stubbornly refused to fall below the mid-$50-a-barrel range. The move in individual stocks hasn't been as large as in the technology sector because short-interest ratios didn't get as high as for the technology stocks I've mentioned. Chesapeake Energy moved up 5% in the first four days of the week, before retreating on Friday, on a short-interest ratio of 1.8%.

But the most interesting sector to watch has been gold. Gold isn't supposed to go up in price when inflation is contained, when the dollar is strong, and when the macroeconomic background is relatively unthreatening. But gold did what none of the gold short-sellers thought possible, moving higher and still higher on continued heavy demand from jewelry buyers in India and on word from central banks, Russia's most prominently, that they would buy gold. Stocks like Newmont Mining (short-interest ratio 2.8) and

Glamis Gold

(GLG) - Get Report

(short-interest ratio 4.2), moved up last week -- as did the price of gold.

Keep a Finger on the Trigger

Which brings me to the question of what individual investors should do about this market.

Once the short-interest fuel has been consumed -- and we'll see in the coming weeks how much has been burnt as the

Nasdaq

and

New York Stock Exchange

report new short-interest numbers -- this rally will be in danger of faltering. The stock market will still be facing the real problems of higher interest rates from the

Federal Reserve

, a slowing housing market that could dampen consumer demand and a stronger U.S. dollar that could cut into U.S. exports.

Nothing in the current rally speaks to a long-term faith in the fundamentals of this stock market. The money flows that have fed this rally could reverse course as quickly as they did when the quarter ended in September, beginning October's market decline.

My advice: Enjoy the rally. Celebrate if anything you own has turned out to be the right stock, in the right place at the right time.

But don't get carried away and chase anything here. The traders who have profited from this rally will be looking for overly enthusiastic investors to sell their shares to in December. Keep both your eyes on the fundamentals of what you own -- and be prepared to sell if the price of anything gets too far out of line. This market is likely to swing too far to the long side in December after swinging too far to the short side in October.

At the time of publication, Jim Jubak owned or controlled shares in the following equities mentioned in this column: Chesapeake Energy, Encana, Komag, Newmont Mining, and Yahoo!. He does not own short positions in any stock mentioned in this column.

Jim Jubak is senior markets editor for MSN Money. He is a former senior financial editor at Worth magazine and editor of Venture magazine. Jubak was a Bagehot Business Journalism Fellow at Columbia University and has written two books: "The Worth Guide to Electronic Investing" and "In the Image of the Brain: Breaking the Barrier Between the Human Mind and Intelligent Machines." As an investor, he says he believes the conventional wisdom is always wrong -- but that he will nonetheless go with the herd if he believes there's a profit to be made. He lives in New York.