NEW YORK — U.S. stocks on Friday capped a volatile trading day with modest gains after investors weighed a surprisingly strong October jobs report and an unexpected rise in factory orders against ongoing credit-related upheaval in the financial sector.

"The economic data keeps interrupting the pity party" on Wall Street, said Jim Paulsen, Wells Capital Management's chief investment strategist.

"The economy is still in good shape, but the mood is definitely pessimistic; subprime is still the issue," said Matt King, portfolio manager for Bell Investment Advisors.

The Dow Jones Industrial Average climbed 27.2 points to 13,595.10, but ended with a 1.5 percent loss for the week.

Of the Dow's 30 components, 18 ended higher, after a day in which the blue-chip benchmark's financial components were hard hit.

Specifically, J.P. Morgan Chase fell 2.6 percent, while American International Group gave up 0.3 percent; American Express Co. traded down 0.05 percent; and Citigroup Inc. (c) declined 2 percent.

The S&P 500 closed up 1.25 points to 1,509.69 but ended with a weekly loss of 1.6 percent.

The Nasdaq Composite rose 15.55 points to 2,810.38, leaving it virtually unchanged from the prior week's close.