The Dow Jones industrial average is ending the day up 72 points at 13,486. The Standard & Poor's 500 index is closing up 14 at 1,447. And the Nasdaq composite index finishes the day up 43 at 3,136.
It's the first gain in five trading sessions for the Dow and the first in six for the S&P.
Investors reacted well to a Spanish budget designed to show investors that the country can meet deficit-cutting targets. There is also speculation that the central bank of China will act soon to help that country's economy.
Advancing stocks beat decliners by about 3-to-1 on the New York Stock Exchange. Early figures show volume was lighter than average, 3.1 billion shares.