Updated

U.S. consumers were more optimistic in June as once-soaring gasoline prices eased, and the government reported that a key measure of the nation's trade deficit narrowed more than expected in the first quarter.

The University of Michigan's preliminary June index of consumer sentiment read 82.4, up from May's final reading of 79.1 and above Wall Street expectations for a reading of 79.0.

Click here to visit FOXBusiness.com's Economy page.

Analysts said the rise in confidence reflected an attitude that another widely expected Federal Reserve hike in official interest rates later this month will not hurt the economy.

"The fear that another rate hike might choke the economy has gone away, which is helping markets, helping stock markets and helping the consumers," said Elisabeth Denison, economist at Dresdner Kleinwort Wasserstein in New York.

"Gasoline prices are receding from their peak, so overall maybe there is more confidence that the Fed can achieve a soft landing," Denison said.

Retail gasoline prices, which many analysts say have a significant impact on consumer sentiment, have decreased slightly from the same period a month ago, according to data from travel organization AAA.

Before the June sentiment data's release, the Commerce Department said the U.S. current account deficit — which measures international transactions as well as physical imports and exports — narrowed more than expected in the first quarter to $208.7 billion, as exports rose more than imports.

The quarterly shortfall was much smaller than Wall Street forecasts for a deficit of $222.5 billion, and was below the downwardly revised record of $223.1 billion in the fourth quarter of 2005.

Analysts said, however, that the unexpected narrowing did not signal a dramatic turnaround.

"At the end of the day, it's still the second-largest (deficit) on record so if people are concerned about the U.S. trade deficit, this won't change anything," said Marc Chandler, chief global currency strategist with Brown Brothers Harriman.

The dollar was trading mostly steady against the euro and the yen , while Treasury debt prices were steady to slightly higher. Stocks were lower, with technology stocks leading declines after Microsoft Corp. (MSFT) said Chairman Bill Gates would give up his day-to-day role in the software giant he co-founded in 2008.

The Fed is widely expected to raise official interest rates for the 17th consecutive time at its policy meeting June 28-29 in an effort to slow inflation. The central bank's target for the benchmark overnight lending rate currently stands at 5 percent.

The prospect of rising interest rates in the United States and elsewhere has been weighing on stock markets in recent weeks. But with U.S. confidence rising, some said investors may have overestimated the impact on the economy of another rate hike.

"People got too pessimistic too quickly," said March Pado, U.S. market strategist with Cantor Fitzgerald & Co. in San Francisco.

Click here to visit FOXBusiness.com's Economy page.