The latest economic data gave investors reason to feel optimistic on Tuesday.

The consumer price index, the government's main gauge of inflation, held steady in May, the Labor Department reported. The index had posted a 0.3% drop in April. The core index, which excludes volatile food and energy items, rose 0.3%, its highest gain in 10 months.

Housing prices rose 0.4% after a 0.1% decline in April. Price increases in medical care, food and recreation were offset by drops in energy, transportation and clothing prices.

Separately, housing starts jumped 6.1% to a seasonally adjusted annual rate of 1.732 million units, compared to a revised 6.3% drop in April, according to the Commerce Department. The news suggests that the housing sector continues to weather the economic slowdown thanks to record-low mortgage rates.

Building permits, a measure of future building activity, climbed 3.7% to an annual rate of 1.788 million homes, marking the second straight month of increased activity, the Commerce Department said.

Meanwhile, industrial production rose 0.1% in May, marking its first increase since February, according to the Federal Reserve, while capacity use held steady at 74.3%. This development, following Monday's positive reading on the New York Empire State Index, a measurement of industrial production in the state of New York, suggests that one of the weakest spots of late in the economy may be strengthening.

Elsewhere, the retail market showed signs of life this week as the Redbook Retail Average, an index that reflects the same-store sales of a group of companies accounting for 85% of the department stores in the Census Bureau's monthly retail sales report, climbed 1.3% for the week, after declining in May. The BTM-UBSW weekly chain store sales snapshot, an index measuring the sales results of seven national retail chains, jumped by 0.3% this week after falling by the same amount last week.