Stocks overcame an early stumble Tuesday and finished modestly higher as investors shook off concerns about heightened tensions in the Middle East and a drop in consumer confidence.

Stocks overcame an early stumble Tuesday and finished modestly higher as investors shook off concerns about heightened tensions in the Middle East and a drop in consumer confidence.

For Tuesday:

The Dow Jones industrial average climbed 19.51 points, or 0.1 percent, to 17,812.19.

The Standard & Poor's 500 index added 2.55 points, or 0.1 percent, to 2,089.14.

The Nasdaq composite index inched up 0.33 points, or less than 0.1 percent, to 5,102.81.

For the week:

The Dow has lost 11.62 points, or 0.1 percent.

The S&P has slid 0.03 points, or less than 0.1 percent.

The Nasdaq has declined 2.11 points, or less than 0.1 percent.

For the year:

The Dow is down 10.88 points, or 0.1 percent.

The S&P is up 30.24 points, or 1.5 percent.

The Nasdaq is up 366.75 points, or 7.7 percent.