NEW YORK (CNNMoney) -- U.S. stocks rallied Friday, with the Dow and S&P 500 breaking a six-day losing streak, as JPMorgan Chase reported stronger-than-expected second-quarter earnings despite a trading loss of $5.8 billion so far this year.
Shares of JPMorgan (Fortune 500) soared almost 6%. In addition to earnings, JPMorgan also revealed that traders involved in the loss no longer work at the bank and could lose as much as two years of income.,
"The news is relieving the market of some of its worst nightmares, since the loss could have been bigger and some of the actions taken by the bank are actually helping confidence," said Peter Cardillo, chief market economist at Rockwell Global Capital. "The feared disaster wasn't all that."
The Dow Jones industrial average () jumped 204 points, or 1.6%, the S&P 500 ( ) added 22 points, or 1.7%, and the Nasdaq ( ) climbed 42 points, or 1.5%. The day's gains were the best since June 29.
Other major U.S. banks also rose on Friday. Shares of Bank of America (Fortune 500), Morgan Stanley ( , Fortune 500), Citigroup ( , Fortune 500) and Goldman Sachs ( , Fortune 500) all closed between 3% and 6% higher.,
Investors also reacted to comments from Federal Reserve Bank of Atlanta President Dennis Lockhart that stimulus action may be coming down the pike.
"My support for the current stance of policy rests on a forecast that sees a step-up of output and employment growth by year-end and into 2013," he said in prepared remarks to the Mississippi Economic Council. "If the economy continues on the track indicated by the most recent incoming data and information, that forecast will become untenable, as will the policy premises underlying it. This is a challenging juncture for policymaking."
Stocks also gained traction on disappointing economic numbers out of China, as investors grew hopeful that the weakness could prompt additional stimulus measures.
In the second quarter, GDP in China grew at an annual pace of 7.6%, the lowest rate in three years and a deceleration from the 8.1% growth rate it saw the previous quarter.
Anxiety remains about the European debt crisis. Investors are concerned that political headwinds in Europe will stymie the latest rescue plan for the euro currency union, which eurozone leaders announced at a summit meeting late last month.
On Friday, Moody's downgraded Italy's government debt two levels, citing an increased likelihood the country will be slammed by higher borrowing costs. Yields on the Italian 10-year bonds rose to 6.06%.
But analysts say that it's not all bad news for Italy, as an auction of 3-year bonds sold at an average yield of 4.65%, down from 5.3% in mid-June.
"This is positive for risk," Cardillo said. "It shows that upbeat confidence may be returning."
U.S. stocks fell Thursday as fears about a global economic slowdown and disappointing corporate results weighed on the market.
World markets: European stocks closed higher on Friday. FTSE 100 ( ) added 1%, the DAX ( ) in Germany gained 2.2%, and France's CAC 40 ( ) ticked up 1.5%.
Asian markets ended just above breakeven. The Shanghai Composite () and Japan's Nikkei ( ) closed slightly higher, while the Hang Seng ( ) in Hong Kong added about 0.4%.
Economy: The government reported producer prices in June rose by 0.1%, despite expectations that they would fall by more than half a percent.
The University of Michigan's Consumer Sentiment Index for July fell to 72, from 72.2 the prior month. The reading was below expectations.
Companies: Wells Fargo ( , Fortune 500) posted earnings of 82 cents on $21.4 billion in revenue, on par with expectations. On Thursday, the Department of Justice announced the bank agreed to pay $175 million to settle allegations that it discriminated against minority borrowers. Shares rose more than 3%.
Global banking giant HSBC (HSBC may be fined over its alleged lapses, though the Financial Times speculated that the bank could be on the hook for up to $1 billion, citing analyst estimates.) will face scrutiny on Capitol Hill on Tuesday over its allegedly lax protections against money laundering by organized criminals and terrorist groups. It's not clear if or how much
Oil for August delivery rose $1.02 to settle at $87.10 a barrel.
Gold futures for August delivery rose $26.70 to settle at $1,592.00 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell slightly, pushing the yield up to 1.50% from 1.48% late Thursday.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.60%||3.68%|
|15 yr fixed||2.73%||2.79%|
|30 yr refi||3.64%||3.72%|
|15 yr refi||2.77%||2.82%|
Today's featured rates: