S&P Snaps 5-Day Slump; Apple Climbs 2%

Stocks finished higher Thursday, with the S&P 500 breaking a five-day losing streak, after Spain unveiled its economic reform plans and amid optimism China's government would provide additional stimulus.

“It’s also the end of the quarter, so there’s a bit of ‘window dressing’ going on as well,” said Todd Schoenberger, managing principal at The BlackBay Group.

Major averages are poised to log strong gains for the quarter, with the Dow up nearly 5 percent and the S&P and Nasdaq up more than 6 percent each.

Symbol
Price
 
Change
%Change
NASDAQ
---
S&P 500
---

The Dow Jones Industrial Average rose 72.46 points, or 0.54 percent, to close at 13,485.97, ending in positive territory for the first time in five sessions. General Electric and Intel led the blue-chip gainers.

The S&P 500 climbed 13.83 points, or 0.96 percent, to end at 1,447.15. The Nasdaq rallied 42.90 points, or 1.39 percent, to finish at 3,136.60.

The CBOE Volatility Index, widely considered the best gauge of fear in the market, tumbled below 15.

Most key S&P sectors were higher, led by techs and energy, while utilities slipped.

(Read More: September Bad for Stocks? Why It's Different This Time)

“The idea that the Chinese are going to do extensive stimulus had perked everything up…[but] I was amazed that the data this morning didn’t put a bigger dent in this rally—those numbers (durable goods and GDP) were almost recessionary,” Art Cashin, director of floor operations at USB Financial Services. “Meanwhile, we’re also pretty oversold, we’ve been down several sessions in a row.”

Chinese stocks rebounded from multi-year lowsamid speculation the government would embark on a fresh stimulus programto support the slowing markets. In addition, China's central bank made a $57.9-billion injectioninto money markets this week, the largest in history.

Spain announced the budget for 2013 would focus on cutting spendingrather than raising taxes, and the government would pass 43 new laws to reform the economy over the next six months. Spain also said it will tap 3 billion euros from the social security reserve to cover liquidity needs. European shares ended slightly higher.

Protests in Europe, underlined by anti-austerity measures in Madrid and Athens, pushed the region's market sharply lower in the last few sessions. (See: Violent Protests Hit Greece and Spain)

GE rose after the conglomerate lifted its 2012 industrial revenue growth forecast to 10 percent, versus a prior forecast of between 5 percent and 10 percent. GE is the minority shareholder of NBCUniversal.

Hewlett-Packard held small gains even after Jefferies cut its rating on the tech giant to "underperform" from "hold" and lowered its target to $14 from $17. H-P stock hit its lowest level in eight years before rebounding in the previous session.

Apple gained nearly 2 percent, breaking a three-day losing streak. And Google advanced to all-time highs after Evercore raised its price target on the 14-year old search-engine giant to $860 from $750.

Among earnings, Discover Financial Services jumped after the credit-card provider posted earnings that topped expectations.

Nike , Accenture and Research In Motion are slated to post results after the closing bell.

On the M&A front, Sealy rallied after the mattress maker said it will be acquired by bigger rivalTempur-Pedic International for about $242 million and assume about $750 million in debt.

Hartford gained after the Wall Street Journal reported that Prudential is near an agreementto buy the financial services company's individual life insurance division.

On the economic front, the U.S. economy expanded at a tepid 1.3 percent annual rate, the slowest pace since the third quarter of 2011, according to the Commerce Department. Adding to woes, durable goods orders slumped by the most in 3-1/2 years in August.

And pending home sales dropped in Augustdue to a supply shortage, according to the National Association of Realtors.

“Market’s ignoring the poor data—it just supports the Fed’s thesis that QE was needed,” said Schoenberger. “The key economic report that everyone will be watching will be the unemployment report [at the end of next week].”

The only bright spot in today's slew of economic data was the weekly jobless claims figure. Claims for unemployment benefits fell to its lowest level since July, according to the Labor Department, while the four-week moving average for new claims snapped five straight weeks of increases.

Treasury prices held their lossesafter the government auctioned $29 billion in 7-year notes at a high yield of 1.055 percent and bid-to-cover of 2.61.

By CNBC’s JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)

Coming Up This Week:

FRIDAY: Personal income & outlays, Chicago PMI, consumer sentiment; Earnings from Walgreens

More From CNBC.com: