U.S. stocks held modest gains Thursday as investors weighed the latest corporate results against signs of economic weakness.
The advance came despite a rash of disappointing economic reports. Investors were encouraged by some better-than-expected corporate results, though the outlook for profits in the second half of the year is murky.
Analysts say the market's resiliency suggests investors are in a holding pattern, with a bias toward buying selective stocks, as they struggle with a lack of direction.
"The market is stuck in limbo until we get much better fundamental news or a more significant sell-off," said Bruce McCain, chief investment strategist at Key Private Bank. "It's like being poised on a ledge, halfway down the mountain, not sure if you're going up or down."
The Dow Jones industrial average gained 34 points, or 0.2%, to end the day at 12,943. The S&P 500 edged up 4 points, or 0.3%, to 1,376. The Nasdaq advanced 23 points, or 0.8%, to 2,966.
IBM led gainers on the Dow. Big Blue reported quarterly earnings late Wednesday that beat analyst expectations and issued upbeat guidance. Shares were up nearly 4%.
Financial shares weighed on the index. Shares of American Express fell 3.5% after the company said Wednesday that earnings rose in the second quarter, although customer spending was weak.
After the market closed, Google reported stronger-than-expected quarterly profits, although sales growth was below forecast. Microsoft reported a quarterly loss, reflecting a $6.2 billion charge related to its online services department.
Investors had been bracing for a lackluster quarter, but the bulk of corporate results have come in above expectations.
Of the 77 S&P 500 companies that have reported earnings through Wednesday, 48 have topped forecasts, according to research from S&P Capital IQ.
"The market seems to be responding to corporate profits which are not a disaster," said Nick Kalivas, market strategist at investment research firm Hadrian Partners, in a note to clients.
Economy: The worrisome state of the economy may also be limiting gains for the broader market.
Initial jobless claims last week came in higher than expected, at 386,000. That was an increase of 34,000 from the previous week's revised figure.
The National Association of Realtors said sales of existing homes fell 5.4% to a seasonally adjusted annual rate of 4.37 million in June, from an upwardly revised 4.62 million in May. Analysts were expecting sales to come in at an annual rate of 4.65 million.
The Federal Reserve Bank of Philadelphia released its Business Outlook index, which showed manufacturing activity in the region remains weak so far this month. And after rising for two months in a row, the Conference Board's index of Leading Economic Indicators fell 0.3% in June to 95.6.
"Today's U.S. reports revealed a wide array of downside disappointments," said Michael Englund, chief economist at Action Economics.
Earlier this week, Fed chair Ben Bernanke gave few hints about another round of stimulus, while cautioning that the outlook for the economy remains gloomy.
Companies: Tech firms reported mixed results Thursday. Nokia's stock rose even though the company reported a wider loss, and Verizon fell 2% even though it reported earnings in line with forecasts. Google and Microsoft will release results after the closing bell.
Morgan Stanley, the last of the big banks to report quarterly results, missed earnings and revenue forecasts, sending shares down more than 5%.
eBay was among the biggest gainers and most active stocks on the S&P 500. Shares of eBay surged more than 8% to a 6-year high after the online auction site reported earnings and revenue that topped forecasts, citing strong growth from PayPal.
Shares of Walgreen surged after the company finally reached a multi-year pharmacy network agreement with Express Scripts. Shares of Walgreen rivals CVS and Rite Aid both fell about 6%.
Safeway said net income in the second quarter fell nearly 16% as the grocery chain struggles to compete with big-box retailers. Shares fell 5%.
Shares of aeronautics and defense contractor Textron surged 11% after chief executive Scott Donnelly reportedly said the company is considering a number of acquisitions.
Five Below, a teen-oriented discount retailer, surged 55% in its initial public offering.
World markets: European stocks closed higher. Britain's FTSE 100 edged up 0.5%, the DAX in Germany added 1% and France's CAC 40 gained 0.8%.
Spain sold €2.98 billion worth of two-, five- and seven-year notes but demand was weak, sending the yield on Spain's benchmark 10-year bond back above 7%.
Asian markets ended higher. The Shanghai Composite rose 0.7%, the Hang Seng in Hong Kong climbed 1.7% and Japan's Nikkei gained 0.8%.
Currencies and commodities: The dollar gained ground against the euro, but fell versus the British pound and Japanese yen.
Oil for August delivery rose $2.79 to settle at $92.66 a barrel. Oil prices have not traded above $90 a barrel since late May.
Retail gasoline prices have also been on the rise. The national average price for a gallon of regular gas increased 1 cent to $3.437, according to a daily survey by AAA.
Gold futures for August delivery rose $9.60 to $1,580.04 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell, pushing the yield up to 1.50% from 1.48% late Wednesday.