Stocks rose on Thursday as a climb in bank shares helped offset disappointing economic data and outlooks from economic bellwethers, including UPS.

Several large U.S. regional banks, including PNC Financial Services Group Inc
and Fifth Third Bancorp posted better-than-expected quarterly results Thursday, providing a glimmer of hope for a sector damaged by higher loan losses in a recessionary economy.

Solid results from companies like Apple Inc appeased investors, helping to limit declines. The iPhone and iPod maker was among the Nasdaq's biggest boosts, up 3.5 percent.

In contrast, United Parcel Service Inc slid 2.7 percent to $53.29 after it said profits were hurt by the economic downturn and forecast second-quarter results below expectations.

U.S. government data showed existing homes sales fell in March to a much lower-than-expected annual rate, while weekly initial jobless claims rose slightly more than expected.

Barring a surprise advance on Friday, Wall Street stocks were on track to snap a streak of gains for six straight weeks.

We're still just getting a lot of mixed views on everything, said Frank Lesh, a futures analyst and broker at FuturePath Trading LLC in Chicago.

We've had a big rally in the market, so we don't know if we're going to be able to extend it anymore. So far, we're just consolidating at the upper end of this move here, but I think we'll need to expect some kind of retracement out of this.

The Dow Jones industrial average <.DJI> gained 51.85 points, or 0.66 percent, to 7,938.42. The Standard & Poor's 500 Index <.SPX> rose 5.42 points, or 0.64 percent, to 848.97. The Nasdaq Composite Index <.IXIC> added 0.61 points, or 0.04 percent, to 1,646.73.

Energy shares also gained as the price of crude rose 1.6 percent. lifting Chevron Corp by 3 percent to $65.57 as the top lift on the blue-chip index.

The broader S&P 500 is up nearly 25 percent from its bear-market low on March 9. While some profit-taking was not unexpected after the impressive rally, analysts said declines could be countered by investors who missed the rally looking to get back into the market.

But analysts said worries surround the banking sector on fears that government stress tests on 19 major U.S. banks may reveal weaknesses. The government is set to unveil the results on May 4.

It's still about the banks. We're all still wondering about the stress tests, said FuturePath's Lesh. That may keep us range bound until we get some more clarity there.

Shares of PNC Financial rose 4.4 percent to $39.66, while Fifth Third gained 2.4 percent to $3.78. The Holders Regional Bank Sector ETF was up 3.7 percent.

Technology and Internet giants Apple and eBay Inc were the biggest lifts on the Nasdaq after both companies topped Wall Street's expectations. Apple gained $4.25 to $125.76, while eBay surged more than 13 percent to $16.85.

Cable services provider Comcast Corp was down 3.2percent and led declines.

(Reporting by Chuck Mikolajczak; editing by Jeffrey Benkoe)