U.S. stock indexes climbed and a selloff in government bonds reversed, after inflation data showed that consumer prices accelerated to a new four-decade high in March.

The S&P 500 rose 0.6%, the Dow Jones Industrial Average edged up 0.3% and the technology-heavy Nasdaq Composite rose 1.2%. On Monday, major indexes retreated, with the benchmark S&P 500 losing 1.7%.