SAN FRANCISCO -- You know things are bad when Yahoo! (YHOO) is one of the market's few bright spots.

Shares of the Internet firm were up nearly 2% to $9.30 Thursday after Needham analyst Mark May boldly threw a buy rating on the stock, saying that the selloff inspired by the latest pessimism over a full-on merger with

Microsoft

(MSFT) - Get Report

is overdone.

"While the economic, consumer and advertising backdrop remains challenged and highly uncertain, a change in leadership, new product launches and the potential for a renewed Microsoft deal could all prove positive catalysts for Yahoo and its shares over the next 3-9 months," wrote May, who put a $12 price target on the stock.

Yahoo!'s stock has fallen off a cliff in the past two months, accelerating its decline from $30 earlier in the year after Microsoft's initial buyout offer of $31 a share on Jan. 31 had lifted the stock from the $20 level.

A subsequent bid of $33 a share was rejected by Yahoo!, and Microsoft walked away from talks in May, with Microsoft CEO Steve Ballmer muttering that his interest in a total acquisition of Yahoo! was over. Yahoo! then tried a search-outsourcing partnership with

Google

(GOOG) - Get Report

, which got cold feet amid a Department of Justice inquiry into the deal.

In recent months, short-term Yahoo! investors (are there any other kind at this point?) have bitten at nearly every rumor of renewed interest between the two companies, sparked both by rumor-mongers and the parsing of non-denial denial statements by company executives on both sides. The news earlier this week that Yahoo! CEO Jerry Yang was stepping down was cheered by investors on Tuesday, who took the stock higher -- until the next day, when it tanked again.

What traders have been left with is a stock at a five-year low.

In a larger sense, Needham's May is right. A bottom exists out there somewhere for Yahoo! shares: The company still generates more than a half-billion in annual free cash flow and, as May notes, valuation is compelling with the stock now trading with its enterprise value (market cap stripped of cash and debt) trading at just twice its expected 2009 operating earnings -- an all-time low.

But a rallying cry that Yahoo! could shoot to $12 from here gives little comfort to those who got into the stock before Veterans Day. And if a one-day rally of 17 cents has already taken away 6% of the upside to come in the next nine months, what does that tell you about the stock?

Whatever transpires in the future between Yahoo! and Microsoft -- a full merger or, more likely, a search-advertising partnership -- investors will have plenty of time

after

the fact to capture a move higher. That's because headwind No. 1 for Yahoo! is something it can do nothing about: the growing unwillingness of businesses and consumers to spend. Until that cloud lifts, a significant move higher can't happen.

And while Yang deserves his lumps as long as Yahoo! stays below $33, the market seems to ignore that he was publicly in favor of a search agreement with Microsoft in his last weeks. A new Yahoo! CEO may ultimately be lauded for sealing the deal, but it won't take place before the price is right for Microsoft.