Even before the trading day began Friday, a battle was brewing on Wall Street. After weeks of pessimism, people were prepared to put money on the line and buy into the teeth of the bear. At the end of the day, with averages ending near their highs for the session, it looked as though the stubborn bulls had re-entered the fray.

While it is unclear whether the market has reached its ultimate nadir, the short-term prognosis after today's action is very good -- for reasons that are less-than fundamental. The end of the first quarter is coming next week, and many mutual funds have thus far registered a poor performance. With a generally bullish tone now, if they funnel new money into the market, they may be able to add a few percentage points to their thus-far meager performance.

On the other side, there are a number of large hedge funds that have been short the market and have made good money betting that stocks will go down. Fearful that a rise in the market could take away from their performance, they may decide to cover their shorts -- buying back shares that they borrowed and then sold. This in itself can make the market go higher through the end of the month.

The action on Thursday and Friday illustrated this nascent bullish trend. A sharp rebound after a tortuous downturn on Thursday emboldened fund managers who have been sitting on growing cash positions to get into the game. They had stocks they wanted to buy, yet the persistent downward trend of the market had kept many on the sidelines. But in order for the buyers to break through, they had to chew through a horde of investors who had ridden the market all the way down, people who saw any rally as an opportunity to get out of the market, people whose portfolios remained massively imbalanced, still chock full of the stuff that seemed so right a year ago and has been nothing but wrong ever since.

Coming off Thursday's wild day, the stakes were high. The

S&P 500

had declined for 11 straight Fridays because investors had been so fearful of carrying new positions into the weekend. If stocks closed up, it would be an incredibly positive sign for the bulls. It could draw new money into the market in the coming week as the markets dashed for March 31.

"We have our buy list ready to go," said one hedge fund manager Friday morning. "We've been buying here and there, but nothing like we're going to buy today."

It was a hard fight through the morning, with each wave of buying getting met with selling, giving intraday charts that jagged look they have when volume is light and it doesn't take much to move the market. But volume wasn't light at all -- there was a lot of money getting put on the line. The hedge fund manager kept buying into each run down -- chart fishing, she called it -- and so did many others. By midday the sellers were exhausted, freeing the market to climb to the highs of the day. The

Dow Jones Industrial Average

added 1.2%, the

Nasdaq

tacked on 1.6% and the broader S&P added 2%.

"The hedge funds that are massively short, at this point they're going to get a little nervous," says

Prudential

futures trader Wally Chin. "The ones that have made money on the downside, it's time for them to reconsider staying with short positions or lightening up a little. If they're going to be lightening, they should probably do it at this point, before it gets out of hand."

It's Time

Such machinations should put the market on better footing through the end of the month, but then the real test comes. With April 16 coming, there is a lot of concern out there that many investors will need to sell to fulfill capital gains tax obligations. And then there are the broader worries, the things that have dragged the market lower during the past year. Will the economy ever rebound? Will the companies' profits picture continue to be so dim?

There are some who reckon that investors became so bearish that such questions have become somewhat irrelevant. On Thursday, the

Chicago Board Options Exchange Volatility Index

, a good measure of fear in the marketplace, hit its highest level since October 1998, when the Russian debt crisis was rolling across world capital markets. Investor sentiment surveys have been increasingly negative. And then there was a raft of major newsmagazines,

Time

among them, with bears on their covers hitting the newsstand this week. Laugh if you like -- but it's been a good contrarian indicator that all the bad news the market's going to get has been priced into the market.

"It says a bottom of sorts is imminent," says

Legg Mason

strategist Paul Macrae Montgomery, who first identified the magazine-cover effect. "We had been in cash and hedged, and we went net long over the last three days." Montgomery didn't do that just because of the magazine covers -- he worries that they may not end up being a great indicator anymore because the press is actually aware of the effect -- but because several of the other signals he watches were flashing buy.

For one, interest rates have come down massively during the past year -- the yield on the 10-year Treasury is at 4.8%, well below the 6.5% it was at when the

Fed

last raised rates in May. And stocks, of course, have come down a ton. That lower yield on bonds makes stocks much more attractive on a relative basis. Strategists like

J.P. Morgan Chase's

Doug Cliggott who look at the relationship between stock prices, earnings and Treasury yields have seen the stock market go from massively overvalued last year to undervalued now.

Yet that hasn't been enough to make Cliggott blindly bullish. He worries that the days when the volatility of both the economy and company earnings became increasingly muted are over, and that means that investors will begin to view stocks as more risky than they have in the past. Time will tell whether this is happening, but it's a certainty that the recent behavior of stocks is probably making investors consider stocks as riskier investments. As a result Cliggott reckons that the target of 1400 on the S&P at year-end -- 22% higher than it is now -- that his model is giving him is a bit too high. Closer to 1300 seems a better bet to him. "If that's the case, the market is looking pretty cheap," he says, "but not cheap enough to close your eyes and buy."

The key remains to buy selectively, says Cliggott. Big-cap technology is not the place to be, he thinks, because companies continue to suffer with inventory and capacity problems, and prices still suggest a growth rate that simply isn't there. But there are areas, like energy and the recently beaten-down pharmaceuticals, that look good.

There are other reasons to be wary of technology, even if the broader market has plumbed bottom. John Bollinger, president of

Bollinger Capital Management

, reckons that so many people are underwater in technology that they will happily sell into rallies.

"I think the tech area, on all rallies, is going to become a source of funds," he says. And those funds are going to go to other parts of the market, as investors look for more balance in their portfolios and areas where the risk of losing money does not seem as great. And this, of course, is what the money that was going into the market today was doing. While the market overall put on an impressive rally, the gains in big technology stocks were middling, when they were there at all. Even if the market has in fact touched bottom, it would be a mistake to think this means that the old leaders will be at the head of the next leg higher.

"People are going to have to sell some things that are near and dear to their hearts," says Bollinger. "They're going to have to liquidate some of that stuff in order to participate in the areas that are moving."