NEW YORK (CNNMoney) -- U.S. stocks closed higher Wednesday as investors focused on better-than-expected corporate results and testimony from the chairman of the Federal Reserve.
The Dow Jones industrial average () rose 103 points, or 0.9%, to end at 12,909. The S&P 500 ( ) gained 9 points, or 0.7%, to 1373. The Nasdaq ( ) added 32 points, or 1.1%, to 2,942.
The advance was led by technology shares, which rallied after Intel (Fortune 500) said PC sales rose 4% in the most recent quarter, although the technology bellwether warned that growth will be slower in the current quarter.,
Bank of America's results beat analysts' expectations, but investors remain worried about mortgage-related expenses. Shares of Bank of America ( , Fortune 500) fell 4.9%, making them the worst performer on the Dow.
After the market closed, IBM (Fortune 500) reported better than expected earnings, but sales were weaker than expected in the second quarter.,
American Express (Fortune 500) reported second-quarter earnings that rose 7% from the same period last year, although the credit card company said customer spending was slower than in previous quarters.,
"The path of least resistance seems to be up," said Ben Schwartz, chief market strategist at Lightspeed Financial. "You generally don't sell a quiet market in the summer time."
The stock market has been surprisingly resilient recently, but investors remain cautious, he added.
"You're not seeing the action you'd normally see in a 100-point move in the Dow," said Schwartz. "I don't see the conviction."
Fed chief Ben Bernanke returned to Capitol Hill for a second day to testify on monetary policy before the House Financial Service Committee. He reiterated testimony before the Senate Banking Committee, when he raised concerns about Europe's debt crisis and the so-called "fiscal cliff" in the United States.
Overall, investors are grappling with an uncertain outlook for Europe and a looming fiscal crisis in the United States, said Martin Leclerc, chief investment officer at Barrack Yard Advisors in Bryn Mawr, PA.
"The big question is how much of the fiscal cliff and European currency crisis has been factored into stocks," said Leclerc. At the same time, he added that stock valuations remain "very attractive."
U.S. stocks held on to gains Tuesday. Investors digested Bernanke's Senate testimony and solid corporate earnings reports.
World markets: European stocks closed higher. Britain's FTSE 100 ( ) rose 1%, the DAX ( ) in Germany gained 1.6% and France's CAC 40 ( ) jumped 1.8%.
Despite the advance, anxieties continue to loom over Europe's debt crisis. A decision is not expected for another eight weeks from Germany's highest court on the legality of the eurozone's multinational bailout fund, the European Stability Mechanism. And in Spain, Finance Minister Cristóbal Montoro said tax collection must improve soon or the country won't be able to pay its public employees.
The International Monetary Fund said eurozone authorities need to act quickly to form a banking union and take other steps to prevent the crisis from escalating further.
Asian markets ended mixed. The Shanghai Composite () rose 0.4%, while the Hang Seng ( ) in Hong Kong lost 1.1% and Japan's Nikkei ( ) shed 0.3%.
Economy: The U.S. Census Bureau issued a construction report that failed to meet forecasts. Housing starts in June rose 6.9% from the previous month to an annual rate of 760,000 units -- the highest level in nearly four years -- while building permits eased 3.7%.
In the latest edition of its Beige Book, the Federal Reserve said economic activity continued to expand at a "modest to moderate pace" across its 12 regional districts in June and July.
Companies: Shares of drug maker VIVUS ( ) jumped 10% after the Food and Drug Administration approved the company's new weight loss drug Qsymia.
Shares of EMC (Fortune 500) rose 10% after the data storage company reported stronger than expected quarterly results.,
Honeywell (Fortune 500) said second-quarter earnings rose 12%. The manufacturing giant offered encouraging guidance, but said it is operating in "a more challenging macro environment." Shares rose 6%.,
Credit Suisse () plans to raise capital levels by 15 billion Swiss Francs by the end of the year, bowing to pressure from the Swiss National Bank. Shares of the global banking giant rose 3%.
The Wall Street Journal and Dow Jones launched a new index that measures the U.S. dollar against a basket of global currencies. The WSJ Dollar Index, or BUXX, edged higher Wednesday.
Oil for August delivery rose 65 cents to settle at $89.87 a barrel.
Gold futures for August delivery fell $18.70 to end the day at $1,570.80 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury rose, pushing the yield down to 1.48% from 1.50% late Tuesday.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.87%||3.83%|
|15 yr fixed||3.07%||3.06%|
|30 yr refi||3.87%||3.83%|
|15 yr refi||3.07%||3.07%|
Today's featured rates: