US stocks closed modestly higher on Friday, giving the market its third straight week of gains.
Consumer staples and health care stocks were among the biggest risers as investors assessed the latest company earnings and economic news.
After several weeks speculating about the implications of a slowdown in China and the timing of an interest rate increase by the Federal Reserve, traders are squarely tuned into company earnings as they hunt for insight into how the global economy is doing.
"That's what the market is focused on," said Quincy Krosby, a market strategist at Prudential Financial. "Are we seeing a pickup in demand overseas and in the United States, and if so, which sectors? That's what this is about."
General Electric rose 3%, the most in the Dow Jones industrial average, after the industrial conglomerate reported earnings that beat analysts' forecasts.
The Dow rose 74.22 points, or 0.4%, to 17,215.97. The Standard and Poor's 500 index gained 9.25 points, or 0.5%, to 2,033.11. The Nasdaq composite added 16.59 points, or 0.3%, to 4,886.69.
The tech-heavy Nasdaq is up 3.2% this year. The Dow and S and P 500 are still negative. The Dow is down 3.4%, while the S and P 500 is off 1.3%.
The three major stock indexes began the day slightly higher, then wavered after midday. The indexes slipped into the red at times before drifting back into positive territory.
Investors appeared to brush off some discouraging economic data, including a Federal Reserve report indicating that US manufacturing production fell for the second straight month in September. A separate Labour Department report showed that employers advertised fewer job openings in August and kept hiring flat. The job market has weakened over the past two months, reflecting slower global economic growth.
Nine of the 10 sectors in the S and P 500 rose. Health care and consumer staples stocks each gained about 1%. The industrials sector declined 0.2%.
General Electric reported a decline in third-quarter profit, but strong performances from its core units helped the company top Wall Street expectations. GE rose 95 cents, or 3.4%, to 28.98 US dollars.
Mattel climbed 6% after analysts at Oppenheimer published a research note highlighting the toymaker's core brands as a bright spot. The report came a day after Mattel reported disappointing third-quarter results. Mattel gained 1.36 dollars to 23.89 dollars.
Traders hammered Quanta Services after the contracting services company lowered its third-quarter profit and revenue outlook, citing project delays and a tough market. The stock plunged 28.5%, losing 7.47 dollars to 18.74 dollars.
Third-quarter earnings are forecast to contract overall as falling energy prices and weak global demand start to eat into profits.
Among companies in the S and P 500 that have already reported third-quarter results, earnings declined 5.1% from a year ago, the first drop in earnings growth since the July-September period in 2009, according to S and P Capital IQ.
"When all is said and done we'll probably be looking at earnings that are flattish for the quarter," said David Lefkowitz, an executive director and equity strategist at UBS. "But excluding the energy sector, we're looking for 6 percent growth, which is consistent with what we saw earlier this year."
The earnings season hits a peak next week with scores of major companies scheduled to report results including Morgan Stanley, Boeing, General Motors, McDonald's and Microsoft.
In Europe, the FTSE 100 index of leading British shares was up 0.6%, while Germany's DAX rose 0.4%. France's CAC 40 gained 0.6%. In Asia, South Korea's Kospi inched down 0.1%, while Hong Kong's Hang Seng rose 0.8%. The Shanghai Composite in mainland China was up 1.6%. Japan's benchmark Nikkei 225 added 1.1%, aided by expectations that the country's central bank will come up with more stimulus measures this month or next.
In energy futures trading, Benchmark US crude added 88 cents to close at 47.26 dollars in New York. Brent crude, used to price international oils, rose 73 cents to close at 50.46 dollars a barrel in London.
Wholesale gasoline rose 2.1 cents to close at 1.328 dollars a gallon, while heating oil rose 1 cent to close at 1.497 dollars a gallon. Natural gas fell 2.3 cents to close at 2.43 dollars per 1,000 cubic feet.
US government bond prices did not move. The yield on the 10-year Treasury note held at 2.02%. The euro was little changed at 1.1349 dollars while the dollar edged up to 119.49 yen.
In metals trading, gold fell 4.40 dollars to 1,183.10 dollars an ounce, silver declined five cents to 16.11 dollars an ounce and copper lost two cents to settle at 2.40 dollars a pound.