Stocks End Higher Amid Optimism for Continued Fed Stimulus; Banks Rally

Stocks shaved their gains in the final hour of trading Thursday, but still ended modestly higher with the Dow recovering from its worst one-day drop in nearly four weeks, as the latest round of tepid economic data suggested the Fed's bond-buying program would remain intact.

(Read More: After-Hours Buzz: LGF, PANW, MS & More)

While major averages are near breakeven for the week, stocks are on track for their first positive month of May since 2009.

S&P 500

The Dow Jones Industrial Average rose 21.73 points, to end at 15,324.53, led by Bank of America and UnitedHealth, after dropping more than 100 points in the previous session.

The S&P 500 gained 6.05 points, to finish at 1,654.41. And the Nasdaq climbed 23.78 points, to close at 3,491.30.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, closed below 15.

Among key S&P sectors, financials and techs led the gainers, while telecoms sagged.

"After some early hesitation, the market got in gear on the upside with leadership from the semiconductors and financials, the kind of leadership you like to see if you are a bull," wrote Elliot Spar, market strategist at Stifel Nicolaus. "[Meanwhile,] in the last few days, many defensive names have come under pressure as money flowed out of them into cyclicals. The catalyst was the 10-year yield staying over 2 percent and the perception that the economy was getting stronger."

(Read More: Stocks Having a 'Taper Tantrum,' Says Fidelity Pro)

Weekly jobless claims unexpectedly gained 10,000 last week to a seasonally adjusted 354,000, according to the Labor Department. But a Labor Department analyst said claims for five states, including Virginia, Minnesota and Oregon, were estimated since state offices had less time to prepare data because of the Memorial Day holiday on Monday.

And the U.S. economy grew at a 2.4 percent annual rate in the first three months of the year, according to revised numbers from the Commerce Department, falling slightly short of estimates for a 2.5 percent gain.

Also on the economic front, pending home sales ticked up 0.3 percent in April from the previous month, according to the National Association of Realtors, rising to the highest level in three years.

"We think this market rally can continue and traders should continue to be long the market, but still hedge to the downside," said Randy Frederick, managing director of active trading and derivatives at Schwab Center for Financial Research. "We still have an overly accommodative Fed stance and there's no indication that it's going to change anytime soon. As long as the Fed continues to buy bonds, there's plenty of reason to be bullish."

Japan's Nikkei index plummeted over 5 percent, weighed down by the strengthening yen and volatile Japanese government bond yields.

(Read More: Sun Will Rise: Investors Still Love Japan)

Investors have been sensitive to the notion that the Fed could soon begin to pull back on its massive unlimited stimulus. Analysts took heart on Wednesday in the comments of Boston Fed President Eric Rosengren, one of the central bank's most vocal proponents of accomodative monetary policy, who said the Fed should continue to flood the economy with more stimulus until the recovery becomes "self-sustaining" and labor markets thaw.

"We do not believe key members of the FOMC have already made up their minds on what the next change in Federal Reserve policy should be," said Nomura analysts in a research note. "Any decision to change the pace of asset purchases will depend on how economic data and financial markets evolve."

Dish Network sweetened its buyout offer for Clearwire Corp to $4.40 per share, valuing the wireless service provider at $6.5 billionand topping a rival bid by Sprint Nextel by nearly 30 percent.

Meanwhile, MidAmerican, a unit of Warren Buffett's Berkshire Hathaway, said it will pay $5.6 billion for NV Energy, the electric utility serving Las Vegas and its casinos.

First Solar surged to lead the S&P 500 gainers after the solar company was raised to "buy" from "neutral" by Goldman Sachs.

In another light day of earnings, Costco edged higher after the warehouse club chain posted earnings that edged past expectations, thanks to low prices for food and gasoline.

Big Lots tumbled after the discount retailer handed in current-quarter and full-year guidance that fell short of expectations.

Joy Global declined after the mining equipment maker reported lower quarterly results and slashed its full-year earnings outlook, hurt by a drop in commodity prices.

Lions Gate Entertainment and Splunk are among notable companies scheduled to post earnings after the closing bell.

Facebook rallied after BMO upgraded the social networking giant to "outperform" from "market perform" and Jefferies lifted its rating on the company to "buy" from "hold."

Moody's Investors Service downgraded aluminum producer Alcoa to junk grade, citing weak aluminum prices and tough market conditions.

Treasury prices rallied after the government auctioned $29 billion in 7-year notes at a high yield of 1.496 percent. The bid-to-cover ratio, an indicator of demand, was 2.70.

—By CNBC's JeeYeon Park. Follow JeeYeon on Twitter: @JeeYeonParkCNBC

Coming Up This Week:

FRIDAY: Personal income & outlays, Chicago PMI, consumer sentiment, farm prices, OPEC mtg

More From CNBC.com: