(c) 2013, Bloomberg News.

(c) 2013, Bloomberg News.

NEW YORK U.S. stocks rose Friday, halting the first two-day drop in the Standard & Poor's 500 index in three weeks, as optimism about corporate earnings offset concern that improving economic data could prompt the Federal Reserve to trim stimulus.

First Solar rallied 18 percent after the largest U.S. solar-panel manufacturer said third-quarter profit almost doubled. American International Group lost 6.5 percent after premium revenue fell at its property-casualty division. Chevron slid 1.6 percent as it reported profit below estimates as weaker refining margins eroded gains from higher commodity prices and output from wells.

The S&P 500 ended regular trading down 0.3 percent to 1,761.64, after falling as much as 0.2 percent earlier in the session. The equity gauge advanced 0.1 percent in the past five days, its fourth straight weekly gain. The Dow Jones industrial average rose 69.80 points, or 0.5 percent, to 15,615.55 Friday. About 6.8 billion shares changed hands on U.S. exchanges, 14 percent above the three-month average.

"Earnings drive the market, and earnings have been good," Richard Sichel, the chief investment officer at Philadelphia Trust, where he helps oversee $1.9 billion, said by phone. "Economic growth is slow but going in the right direction. Stocks definitely have shown that they're the best place to be, and that can continue in spite of things going on in Washington."

Better-than-forecast corporate results and Fed stimulus have helped the S&P 500 rally 24 percent this year as it challenges 2009 for the best annual gain in the past decade. The gauge jumped 4.5 percent in October for the biggest advance in three months and closed at a record Oct. 29.

Of the 368 S&P 500 companies that have reported results for the third quarter, 75 percent exceeded analysts' predictions for profit, while 53 percent beat sales estimates, data by Bloomberg showed. Profits for members of the gauge probably increased 4.1 percent in the period as sales climbed 2.9 percent, according to analysts' estimates compiled by Bloomberg.

Investors continued to shift money into stocks last month, as U.S. equity exchange-traded funds drew $18.2 billion in October, the most in three months and the third-highest amount since 2010, according to Bloomberg data. About $110.6 billion has been absorbed this year, putting the stock ETFs on pace for the highest flows since the records began in 2000.

Equities turned lower earlier Friday after improving manufacturing data raised concern that the Fed will cut its $85 billion in monthly bond buying sooner than expected. The Institute for Supply Management's factory index rose at a faster pace than forecast in October, indicating U.S. manufacturing was a source of strength. An earlier report from China indicated the nation's official manufacturing Purchasing Managers' Index rose more than estimated in last month.

Fed policy makers this week said the economy showed signs of "underlying strength" even as the bank maintained the pace of stimulus while awaiting further signs growth is strong enough to bring down 7.2 percent unemployment. Economists in a Bloomberg survey project that tapering will begin in March, based on the median estimate.

The data Friday came amid concern the 16-day U.S. government shutdown last month may have slowed growth in the fourth quarter. The economy will probably expand at a 2 percent annualized rate in the final three months of the year, less than economists projected at the start of the federal closure. The median projection of 71 economists surveyed by Bloomberg on Thursday compares with a 2.4 percent forecast in an Oct. 4-9 survey.

Fed Bank of St. Louis President James Bullard said gains in the labor market since September 2012 could warrant a cut in the Fed's monthly bond purchases. Charles Plosser, president of the Philadelphia Fed who has opposed the central bank's current round of stimulus, said inflation will be a concern as the Fed unwinds its balance sheet.

The S&P 500's rally has left the index trading at 15.9 times its companies' estimated earnings, after slipping from the highest valuation since the start of 2010, according to data compiled by Bloomberg.

"We have gotten pretty overbought and we were due for some pause, which is what we have been getting since the Fed statement," Michael James, a Los Angeles-based managing director of equity trading at Wedbush Securities, said in an interview. "The market continues to be sloppy since."

The Chicago Board Options Exchange Volatility Index, the gauge known as VIX that measures options traders' estimate of future price swings in S&P 500, slid 3.4 percent, halting a four-day rally. The gauge dropped 17 percent in October.

Seven out of 10 main industries in the S&P 500 advanced Friday, as industrial stocks and utilities rose at least 0.7 percent to pace gains. Boeing jumped 1.9 percent to a record $133.03 for the biggest gain in the Dow.

First Solar rallied 18 percent to $59.14 as sales of power plants and revenue from new projects boosted profit. Net income rose to $195 million, or $1.94 a share, from $87.9 million, or $1, a year earlier, according to a statement late Thursday. Analysts on average had predicted earnings of 83 cents.

J.C. Penney advanced 8.5 percent to $8.14, a one-month high. ITG Investment Research analyst John Tomlinson boosted his third-quarter revenue estimate, citing "improved sales trends."

Netflix rose 2.1 percent to $329.27. The online video-streaming service was upgraded to outperform from neutral at Robert Baird & Co.

Chevron slid 1.6 percent to $118.01. The second-largest U.S. energy producer by market value said profit from processing crude oil into fuels tumbled 45 percent during the third quarter to $380 million amid rising feedstock costs and repairs at a California plant that crimped gasoline and diesel output. The refining slowdown overshadowed a 2.7 percent rise in oil and gas production led by fields from Kazakhstan to Pennsylvania.

Energy companies lost 0.3 percent for the steepest decline among S&P 500 groups, as crude fell below $95 a barrel for the first time since June.

AIG, the insurer that repaid a U.S. rescue last year, declined 6.5 percent to $48.28, headed for the lowest close in a year. Premium revenue at the property-casualty division fell 3.7 percent to $8.43 billion in the third quarter, the company said in a statement late yesterday. Third-quarter net income rose to $2.17 billion, or $1.46 a share, from $1.86 billion, or $1.13 a year earlier, New York-based AIG said.

Tower International, a maker of metal components for the automotive industry, fell 5.1 percent to $20.14 after saying an affiliate of Cerberus Capital Management plans to sell about 2.6 million shares in the company.

- - -

With assistance from Bloomberg reporters Sofia Horta e Costa in London and Nikolaj Gammeltoft in New York.