Wall Street reversed a three-day slide Wednesday as investors returned to the market in search of bargains, shrugging off high-tech profit warnings and an analyst downgrade of Internet stocks.

The advance had little conviction behind it, however, as volume remained light and the major benchmarks lost more than half of the gains made earlier in the session. Investors were generally making few big moves as they awaited second-quarter earnings.

But analysts said investors were making some bets on hopes for strong second-quarter results overall. A slight drop in oil prices also cheered the market.

"This is a little bit of a relief rally, certainly some bargain hunting," said Peter Cardillo, chief strategist and senior vice president at S.W. Bach. "This is a very nervous market, and it needs to hear better news from corporate America, telling it that the earnings growth is still in place. We're not hearing that from the technology sector."

The Dow Jones industrial average rose 20.95, or 0.2 percent, to 10,240.29. The Standard & Poor's 500-stock index gained 2.12, or 0.2 percent, to 1118.33. The tech-dominated Nasdaq composite index climbed 2.65, or 0.1 percent, to 1966.08.

Corporate software makers PeopleSoft and JDA Software Group both warned that their quarterly earnings would fall below analysts' expectations. PeopleSoft rose 31 cents, to $17.13, while JDA Software skidded 83 cents, to $11.02.

Microsoft gained 8 cents, to $28.10, after chief executive Steven A. Ballmer, in a memo to employees, said the company would trim $1 billion in expenses by reducing prescription drug benefits and stock discounts for its workers.

Prudential Securities downgraded the entire Internet sector to "neutral" from "favorable," citing the possibility of a summer slowdown. Prudential singled out eBay, cutting its rating on the online auctioneer to "neutral weight" from "overweight." EBay fell $2.97, to $86.87.

Yahoo fell $4.58, to $28.02, in after-hours trading after reporting earnings that were in line with analysts' expectations. Yahoo was down 62 cents, at $32.60, for the regular session. Analysts said the earnings report was solid, but that Yahoo's outlook for the rest of the year wasn't as bullish as Wall Street would have liked.

Alcoa also reported its earnings after the session, missing Wall Street estimates by a penny despite nearly doubling its profit from a year ago. Alcoa closed up 79 cents, at $32.77, in the regular session, but fell 76 cents, to $32.01, in after-hours trading.

Other Indicators

* The New York Stock Exchange composite index fell 78.82, to 6518.71; the American Stock Exchange index rose 1.39, to 1257.57; and the Russell 2000 index of smaller-company stocks fell 0.38, to 572.03.

* Advancing issues outnumbered declining ones by 5 to 3 on the NYSE, where trading volume rose to 1.32 billion shares, from 1.28 billion on Tuesday. On the Nasdaq Stock Market, decliners outnumbered advancers by 8 to 7 and volume totaled 1.73 billion, down from 1.89 billion.

* The price of the Treasury's 10-year note was unchanged per $1,000 invested, and its yield remained at 4.47 percent.

* The dollar fell against the Japanese yen and the euro. In late New York trading, a dollar bought 108.45 yen, down from 109.48 late Tuesday, and a euro bought $1.2367, up from $1.2297.

* Light, sweet crude oil for August delivery settled at $39.08, down 57 cents, on the New York Mercantile Exchange.

* Gold for current delivery rose to $402.30 a troy ounce, from $398.30 on Tuesday, on the New York Mercantile Exchange's Commodity Exchange.