Spain and the rest of the European bourses on Wednesday rode on the back of a last-minute agreement overnight in the United States that pulled the world's largest economy away from a so-called fiscal cliff.
The agreement also helped the debt markets, with Spain's risk premium improving significantly on the first working day of the year.
After performing badly last year, the Spanish stock market was one of the protagonists of Wednesday's session in Europe, adding 3.43 percent to close at 8,447.60 points. By contrast, the DAX in Frankfurt gained 2.19 percent, while Paris's CAC 40 put on 2.55 percent.
The spread between the yield on the Spanish benchmark 10-year government bond and the German equivalent eased from 395 basis points from the end of last year to 359 basis points in what was its best session in three months as the risk premium declined to levels last seen in April of last year.
The deal by US lawmakers avoided tax increases for all but the rich and puts off spending cuts. Julián Lirola, an analyst at Self Bank, said the fact spending cuts were only delayed would be a subject of discussion in the markets over the coming weeks, an observation investors opted to shrug off for the meantime.