Stocks End Lower But Dow Logs 8.5% Quarterly Gain

Stocks closed a wild trading session modestly lower but the Dow still managed to end the quarter with a three-month gain of 8.5%.

"It was a little all over the place today but I was happy to see the rally at the end of the day," said Joe Ranieri, managing director of Nasdaq trading at Canaccord Adams.

The trader said the inflation outlook and high energy prices were the two main factors moving the market.

"We had some good volume today, but I think it's going to dry up next week; I'll be surprised if it's active," Ranieri said. "Low volatility and volume leads to higher volatility and price swings, so we'll need to keep an eye on that."

The Dow Jones Industrial Average shaved 13 points Friday, while the S&P 500 and the Nasdaq Composite moved lower.

For the week, the Dow rose 0.4%, the S&P 500 ended flat while the Nasdaq rose 0.6%. The S&P ended the second quarter with a gain of 5.8% while the Nasdaq posted a three-month gain of 7.5%.

Brokerage stocks were a drag on the market throughout Friday's trading session. CNBC's Charlie Gasparino reported Friday that the Securities and Exchange Commission has requested that Bear Stearns provide documents on its two troubled hedge funds.

"The financials have been weak based on the fears of all markets surrounding subprime debt, corporate loans, and concerns about how we finance private equity deals," said Peter Bookvar, equity strategist, at Miller Tabak. "Today in particular, the BBB- ABX index (measuring subprime woes) is putting in fresh lows, and the LCDX on corporates is at its lows for the week."

Added Bookvar, "there are also worries about liquidation in the Bear Stearns hedge funds and its impact on other CDOs."

Research In Motion shares surged a day after the company reported stronger-than-expected earnings. The company also announced a 3-for-1 stock split. The maker of the Blackberry also received several stock-rating upgrades. Banc of America raised its rating on the stock to "buy" from "neutral" and hiked its price target to $238 from $142, while RBC raised its view on the stock to "top pick" from "outperform.

Meanwhile, expectations are mounting as rival Apple and its new iPhone hits stores Friday evening and shareholders wait for consumer reaction to the much-hyped launch.

Crude oil has also been a concern for the market. New York light sweet crude futures rose briefly above $71 a barrel earlier in the session due to falling gasoline inventories.

Shares of Commerce Bancorp surgedfollowing the sudden resignation of Vernon Hill as chairman and chief executive. New Jersey's largest bank said Hill is departing the company's Commerce Bank N.A. unit, effective Friday, and will retire from the parent company on July 31.

Shares of Blackstone Group closed its first full week of trading sharply lower and is now well below its $31 a share IPO price.

Former HealthSouth Chief Executive Richard Scrushy and former Alabama Governor Don Siegelman were sentenced to prison on Thursday on bribery charges. Scrushy was given six years and 10 months, while Siegelman will serve seven years and four months.

In economic news, U.S. personal consumption expenditures, or PCE, showed a 1.9% rise over the past twelve months, the index's lowest reading in more than three years. Core prices rose 0.1% in May.

The Chicago purchasing manager's index fell to 60.2, but was still above economists forecasts of a reading of 58.

European Stocks Lower

European stock markets shook off earlier losses. Earlier, a potential explosive device defused by police in central London dragged the FTSE-100 into negative territory.

The London FTSE-100 , the Paris CAC-40 and Frankfurt DAX staged late session recoveries.

In corporate news, steel maker Arcelor Mittal is in talks with South Korea's Posco about cooperation between the two metal producers. The potential ties could help Posco fend off a takeover from the world's No. 1 steelmaker.

The takeover of ABN Amro remained in focus as unions of the Dutch bank on Thursday backed shareholders in their bid to stop the planned selloff of LaSalle to Bank of America .

Meanwhile, Barclays, which agreed to buy ABN, said it will respect all employees' rights if its takeover is successful.

Asian Stocks Mixed

Asian stocks were mixed in the afternoon session Friday after the U.S. Federal Reserve held rates steady as expected, with Japan closing over 1% higher as a softer yen prompted buying in auto makers and other exporters.

Tokyo's Nikkei 225 Average booked its highest close in a week, climbing 1.15% as exporters such as Toyota Motor gained on a dip in the yen and after the Federal Reserve kept interest rates unchanged in the key U.S. market. Shares of Doutor Coffee, Japan's largest coffee chain, slid after its shareholders backed a merger with Nippon Restaurant System, rebuffing opposition by a hedge fund.

South Korea's Kospi Index turned slightly lower as foreign investors continued cashing in on the market's hefty gains this year, amid worries about the impact of a firmer won on exporters and a drop in Chinese stock markets.

In markets still trading, China's main index, the Shanghai Composite Index, plunged as much as 2.4%, extending Thursday's 4.03% tumble, on concern that large sales of government bonds later this year could suck funds from the market.