Stocks rebounded Tuesday and climbed after a survey showed consumer confidence is at a nine-year high, a sign Americans will keep spending in the months to come. Technology and consumer stocks made the largest gains.

The market opened lower after two days of losses but quickly recovered. The consumer confidence report gave major indexes a boost and they locked in a big gain by early afternoon.

advertisement | advertise on newsday

Technology companies jumped, and solid results from cruise line operator Carnival sent travel-related companies higher. Energy companies slumped with oil prices as hopes for an international cut in fuel production faded.

The Dow Jones industrial average jumped 133.47 points, or 0.7 percent, to 18,228.30. The Standard & Poor’s 500 index picked up 13.83 points, or 0.6 percent, to 2,159.93. The Nasdaq composite gained 48.22 points, or 0.9 percent, to 5,305.71.

U.S. consumer confidence reached its highest level this month since August 2007, according to the Conference Board. The group said its index rose to 104.1 as consumers grew more optimistic about the labor market. The result was better than expected.

Oil prices fell after OPEC countries didn’t make a deal to limit production. U.S. crude fell $1.26, or 2.7 percent, to $44.67 a barrel in New York.