Stronger profits from Microsoft, McDonald's and other major U.S. corporations pushed stocks higher Friday. Optimism from Europe helped brighten the mood.
The Dow Jones industrial average and the Standard & Poor's 500 index had a winning week for the first time this month.
"There's been a wrestling match all week long between strong earnings and weak economic data," said Lawrence Creatura, a portfolio manager at Federated Investors, the money-management firm. "At the moment, earnings are winning."
Before the market opened, McDonald's posted better quarterly profits, buoyed by warm weather and sales of new menu items like Chicken McBites and oatmeal. Sales picked up even in Europe, McDonald's' biggest market, despite economic turmoil and severe weather.
Microsoft beat analysts' projections with quarterly earnings and revenue, and sales in its Windows division were surprisingly strong. And General Electric posted a profit of more than $3 billion, helped by orders for locomotives, aircraft engines and other equipment.
The Dow rose 65.16 points to close at 13,029.26. The S&P 500 added 1.61 points to 1,378.53.
Corporate earnings results have provided a pleasant surprise, said Sam Stovall, chief equity strategist at S&P Capital IQ. After nine straight quarters of growth, earnings for S&P 500 companies were expected to be nearly flat. But eight of every 10 companies that have reported so far, including Coca-Cola and IBM, have beaten estimates. As a result, first-quarter earnings are now projected to rise 4.4 percent, according to S&P.
In Europe, Germany's DAX rose 1.2 percent, and stock indexes in France and Spain were higher. A closely watched survey in Germany, the continent's economic powerhouse, showed business optimism rising for the sixth straight month. Economists had expected a decline.
In other U.S. trading, Apple sank 2.5 percent, helping to tug the Nasdaq composite index down 7.11 points to 3,000.45. Apple, the most valuable company in the world, accounts for 12 percent of the Nasdaq.
The Dow gained 1.4 percent this week, and the S&P 500 index 0.6 percent. But it wasn't a smooth ride. Better earnings reports and higher retail sales helped drive the stock market up to start the week.
Then worries about Europe came storming back. Markets reversed course Wednesday, after the Bank of Spain said that the amount of bad loans held by Spanish banks rose to an 18-year high.