Updated from 4:11 p.m. EDT

Stocks posted gains Wednesday, but another round of impressive corporate earnings reports ran up against a key resistance level on the

S&P 500

.

The

Dow Jones Industrial Average

was the day's best performer, rising 43.50 points, or 0.41%, to 10,557.39. The S&P 500 was up 1.08 points, or 0.09%, at 1223.29. The

Nasdaq Composite

added 0.96 points, or 0.04%, to 2144.11. The 10-year Treasury fell 4/32 in price to yield 4.16%, while the dollar was higher against the yen and euro.

"I like the way the market finished positive," said Jay Suskind, head of institutional equity trading with Ryan Beck & Co. "There's a sense that the market does want to move higher. The tone has been strong, and today may have been a digestive day. We may just be setting up a base off which we can go higher."

The S&P 500 continued to struggle with its four-year closing high of 1225, set in early March. The broad-market index briefly inched above the zenith during intraday trading Tuesday, only to back down to 1222 at the close.

"We're hoping the S&P 500 can break out," said Barry Hyman, equity market strategist with Ehrenkrantz King Nussbaum. "Once we relieve some of these overbought conditions, it'll be the S&P 500's turn. Unfortunately, a nasty economic number could lead to a selloff from profit-taking. Still, we're getting some good broad participation in the market."

Analysts said stock market rallies sometimes feed on themselves when an obvious technical level such as 1225 on the S&P is breached.

"When you have breakouts, you take away a lot of natural selling pressure," said Peter Boockvar, equity strategist with Miller Tabak. "A person has a tendency to sell once they finally get back to unchanged. If we get above it, anyone who bought stocks over the last four years is making money, so there's less resistance."

The Nasdaq has risen in five straight sessions, adding 74 points, or 3.6%, and currently sits at its highest closing level since Jan. 3.

Trading volume on the

New York Stock Exchange

was 1.35 billion shares, with decliners beating advancers by a 9-to-7 margin. About 1.53 shares changed hands on the Nasdaq, with decliners outpacing advancers 8-to-7.

Oil eased as Tropical Storm Emily was said to be tracking away from the main Gulf Coast oil and gas regions. August crude closed down 61 cents to $60.01 a barrel. An Energy Department report on crude, gasoline and distillate inventories was broadly in line with estimates.

According to a report in the

Financial Times

, Chinese oil company

CNOOC

(CEO) - Get Report

may raise its $18.5 billion bid for

Unocal

( UCL), along with other possible changes to the bid. CNOOC's board will reportedly meet later Wednesday to discuss its strategy.

On the economic front, the Commerce Department released its report on the U.S. trade balance for May, showing that the trade deficit shrank to $55.3 billion from a revised $56.9 billion in April. Economists expected a modest widening to $57.2 billion.

"It was nice to see a decrease in the deficit," added Hyman. "Combined with the belief that the budget is decreasing, it may take pressure off rates moving higher. It leads us to believe the market will hold up pretty well in the near term."

Separately, the Labor Department said that the import price index for June rose 1%, matching expectations, while export prices were unchanged from the previous month.

Stronger sectors Wednesday included technology, banks, transportation and industrials. Health care, energy, semiconductors, retail and homebuilding were among the weaker-performing areas.

IBM

(IBM) - Get Report

was the Dow's best gainer, up almost 2% after Bernstein upgraded the company to outperform from market perform. Also, Caris & Co. raised the stock to buy from above-average. IBM finished up $1.41, or 1.8%, to $81.45.

Among companies reporting early Wednesday,

Abbott Labs

(ABT) - Get Report

said second-quarter earnings rose about 38% from a year ago to $877.1 million, or 56 cents a share, aided by a 17.5% rise in sales to $5.52 billion. Continuing earnings before special items were 58 cents a share, beating the analyst consensus by a penny. Abbott fell $2.06, or 4.1%, to $47.65.

Harley-Davidson's

( HDI) second-quarter earnings slid 4% from a year ago to $237.4 million, or 84 cents a share, beating estimates by a nickel. The company raised guidance for the year but also disclosed an

SEC

inquiry into an April 13 business update that led to heavy selling in the stock. Harley-Davidson added 68 cents, or 1.4%, to $50.38.

European chip-equipment maker

ASML Holdings

(ASML) - Get Report

said its second-quarter earnings nearly doubled to about $136 million, reflecting market-share gains in Asia. The company took down its gross margin estimate for the current quarter and issued guidance on new orders that was slightly soft. Shares rose 44 cents, or 2.6%, to $17.23.

Late Tuesday,

Resources Connection

(RECN) - Get Report

reported a fourth-quarter profit of $15.7 million, or 31 cents a share, up from $10.7 million, or 22 cents a share, a year ago. Revenue rose to $150 million from $107 million a year earlier. The Thomson First Call average consensus was for earnings of 28 cents a share on revenue of $140.9 million. Resources Connection was higher by $5.50, or 23.1%, to $29.35.

In brokerage action, Merrill Lynch upgraded

Symantec

(SYMC) - Get Report

to buy, citing a favorable risk/reward profile once the company's merger is complete. The firm also said the stock's valuation is attractive and that the company's quarterly results could be a positive catalyst. Merrill assigned the stock a price target of $29. Symantec added 65 cents, or 2.8%, to $24.10.

Also, Merrill upgraded shares of

Seagate Technology

(STX) - Get Report

to buy from neutral after

Komag

( KOMG), which will supply aluminum media platters to Seagate, preannounced positive second-quarter results. The firm also raised the 2006 earnings forecast on Seagate to $2.10 a share from $2.08 and set a $23 stock price target. Seagate was up 67 cents, or 3.6%, to close at $19.53.

Finally, Merrill downgraded Seagate rival

Western Digital

(WDC) - Get Report

to buy from neutral, saying Seagate shares are more attactive. Western Digital gained 5 cents, or 0.3%, to $14.60.

J.P. Morgan raised its price target on

Altria

(MO) - Get Report

to $76 from $71, believing that the potential spin-off of the Philip Morris unit would be a catalyst for the shares. Altria rose 76 cents, or 1.2%, to $65.83.

Overseas markets were mixed, with London's FTSE 100 up 0.6% to 5246 and Germany's Xetra DAX adding 0.6% to 4680. In Asia, Japan's Nikkei lost 0.3% overnight to 11,660, while Hong Kong's Hang Seng added 1.1% to 14,307.

To view Aaron Task's video take on today's market, click here

.