Investors breathed a sigh of relief Thursday after Spain released its official 2013 budget.
While the Spanish government had already promised to cut costs, several analysts and traders said that investors were happy to see something officially documenting Spain's willingness to move forward with necessary, albeit painful, cuts.
U.S. stocks spiked Thursday afternoon and ended the day higher. The S&P 500 snapped a five-day losing streak. Despite the market marching lower over much of the past two weeks, all three indexes have are still up more than 10% in 2012.
The Dow Jones industrial average, the S&P 500, and the Nasdaq closed up between 0.6% and 1.4%. Bank stocks led the broad rally, with shares of Bank of America (BAC), JPMorgan Chase (JPM) and Goldman Sachs (GS) all up between 1% and 2%. Even U.S.-listed shares of Spanish banks Banco Santader (SAN) and BBVA (BBVA) rose on the news.
Gold prices hit a seven-month high Thursday, closing up $26.90 to $1,780.50 an ounce.
It's been a worrying week for Spain, as yields on 10-year Spanish bonds shot up above 6% for the first time in three weeks. Investors remain wary about whether Spain will seek a bailout.
"This is the fourth or fifth round of belt tightening that we've seen," said Nicholas Spiro, managing director of Spiro Sovereign Strategy. He said the budget was Spanish Prime Minster Mariano Rajoy's way of "firing the initial salvo" toward negotiating bailout terms.
European Central Bank president Mario Draghi unveiled a bond-buying plan earlier this month aimed at helping indebted nations like Spain and Italy. But the plan comes with strings attached: Any nation seeking ECB aid must agree to a series of reforms and oversight from the bailout funds.
Today's budget is Rajoy's way of convincing policymakers that nothing more can be done, Spiro said. "Spain is trying to climb up a down escalator."
The news out of Europe comes as investors were greeted this morning with mixed data about the U.S. economy. In one of many signs that domestic growth is lagging, second-quarter GDP growth was revised downward.
Durable good orders and pending home sales also signaled further problems for the U.S. economy. Orders for durable goods slowed more than expected in August. Pending home sales, which were expected to increase by 0.5%, actually dropped by 2.6%.
Thursday's only positive note in the barrage of U.S. economic data was the drop in jobless claims.
China also helped boost markets early in the day, following talk that the People's Bank of China may take further easing measures. The Shanghai Composite ended up 2.6%. The Hang Seng in Hong Kong jumped 1.1%, and Japan's Nikkei ticked up 0.5%. It's the latest sign that central banks are taking measures to keep a global slowdown at bay.
European stocks pared gains after a disappointing report on eurozone sentiment, which showed a surprise decline in September. Economists had expected the European Commission's monthly index to be unchanged.
Britain's FTSE 100 and the DAX in Germany closed up 0.2%, and France's CAC 40 rose 0.7%.
Investors are still waiting for the auditors' results of bank stress tests in Spain, due out Friday, which could give investors a better idea of just how deep Spain's banking troubles run.
Companies: Shares of Sealy (ZZ) closed up 2% after rival company Tempur-Pedic (TPX) said it was buying the company for $228 million. Sealy reported zero earnings per share, falling short of expectations. The company canceled the morning's earnings call, citing the new deal. Meanwhile,Temper-Pedic shares surged 15%.
Shares of Advanced Micro Devices (AMD) jumped 3% after the chip maker unveiled a new, faster chip that's expected to be 25% and come with integrated graphics.
Goodyear Tire & Rubber (GT) shares rose 4% after the company revealed a new road vehicle tire, one that will meet the European Union's highest fuel efficiency standards, rules which go into effect in November.
Shares of spice and condiment maker McCormick & Company Inc (MKC) fell 2% following the company's quarterly report in which CEO Alan Wilson warned of continued "volatile material costs." The food company reported earnings per share of 78 cents, beating expectations.
Discover Financial Services (DFS) moved up 7% after the company's earnings beat forecasts.
Shares of Research in Motion (RIMM) spiked more than 15% . While its sales slumped 31% from a year ago and it posted a loss, the results for the troubled BlackBerry maker weren't as bad as feared.
Shares of Nike (NKE) fell in after-hours trading, even though the sneaker company beat forecasts for both revenues and profits.
Currencies and commodities: The dollar rose against the euro, but fell versus the British pound and Japanese yen.
Oil for November delivery added $1.87 to $91.85 a barrel.
Bonds: The price on the benchmark 10-year U.S. Treasury slid, pushing the yield up slightly to 1.65% from 1.62% late Wednesday.
-- CNNMoney Markets & Investing editor Catherine Tymkiw contributed