Stocks notched their first gain of the week Thursday after Spain announced severe budget cuts intended to convince the world that it can meet deficit-reduction targets.
Stocks were also helped by speculation that the central bank of China will act soon to help the world's No. 2 economy.
The Dow Jones industrial average climbed 72.46 points to close at 13,485.97. It was the Dow's first gain in five trading sessions. The Standard & Poor's 500 index, after five days of declines, closed up 0.96 percent to 1,447.15. The Nasdaq composite index rose 1.39 percent to 3,136.60.
The Nasdaq and S&P were helped by a jump in Apple stock, reversing three days of declines. Apple gained $16.14, or 2.43 percent, to $681.32 despite an analyst's report reducing estimates for shipments of iPhones later this year.
As fear grew that Spain will need an international bailout, the finance minister said a draft budget for 2013 cuts overall spending by about $51 billion. He said cuts for ministries would average almost 9 percent.