Indexes were down most of the morning after the Conference Board reported US consumer confidence crumbled in August to its lowest level in more than two years due in part to fallout from political wrangling over a budget deal.

“The rally that we’ve seen is only gaining further ground,” said Michael James, senior trader at regional investment bank Wedbush Morgan in Los Angeles.

“The consumer confidence number this morning was terrible and yet it only had a short-term downside effect on the market. That is a sign of a market in an uptrend mode. When you’re able to get bad news and shrug it off, it’s a very positive sign form the market.”

The Dow Jones industrial average gained 0.49 points, or 0.00 percent, to 11,539.74. The Standard & Poor’s 500 Index shed 0.34 points, or 0.03 percent, to 1,209.74.

The Nasdaq Composite Index gained 8.37 points, or 0.33 percent, to 2,570.48.

The reversal put the S&P 500 on track for its sixth advance in the last seven sessions. Over that time, the index has risen more than 7 percent.

Still, the S&P remained down more than 6 percent in August.

Technical analysts pointed to Monday’s close above the 1,200 level as a sign that bulls may be regaining regaining a foothold.

Caterpillar, up 2 percent to $89.94 and Boeing, up 2 percent to $65.90, were among the top boosts to the Dow. Boeing shares were upgraded.

In other data, US single-family home prices fell slightly in June as the market crawled along at depressed levels.