NEW YORK ( TheStreet) -- Stocks traded within a tight range and finished with marginal gains Wednesday, highlighted by improving bank shares and the strengthening Nasdaq, after investors digested an unexpected dip in wholesale inventories.

The Dow Jones Industrial Average added 3 points, or 0.03%, to 10,567, while the S&P 500 gained 5 points, or 0.5%, at 1146. The Nasdaq became the best performer of the day among the major indices, going ahead by 18 points, or 0.8%, at 2359.

>>Three Energy Investments With Huge Yields

In the afternoon, the government said the difference between its outlays and receipts grew more disparate during February. The Treasury report showed the budget deficit widened to a record $220.9 billion last month. At the same time last year, the deficit stood at $193.9 billion. Still, the gap came in about as expected, as analysts surveyed by Thomson Reuters anticipated a rise to $222 billion during the month.

Shares in the materials sector dwindled on the day, though financial shares were among the better performers, with the KBW Bank index moving 2.2% higher.

Shares of Citigroup ( C) closed up 14 cents, or 3.7%, to $3.96, as the company launched a sale of up to $2 billion worth of trust-preferred securities that were seeing high demand, according to reports suggesting that orders have exceeded $5 billion.

Robert Pavlik, chief market strategist at Banyan Partners, considers Citigroup a "very good idea for long-term investors."

"I think there are a lot of firms that are underinvested in Citigroup, and I think the long-term prospects for Citigroup are very attractive -- especially when you look at Barclays ( BCS) and the fact that they're looking to buy a bank in the U.S.," he said.

American International Group ( AIG) shares also soared 10.6%, likely helped by a short squeeze .

Tech stocks led, as demonstrated by the 2.2% jump in the Philadelphia Semiconductor index. Micron ( MU) paced much of the uptick on the chip index, advancing 4.9% following some upbeat comments from analysts.

On the Nasdaq, Google ( GOOG) opened an online store for integrated applications called the Google Apps Marketplace. News outlets also reported that CEO Eric Schmidt suggested a solution to the company's imbroglio with China may be nearing. Shares added $16.26, or 2.9%, at $576.45.

If you liked this article you might like

Why Alex Rodriguez Is Investing in Billionaires Warren Buffett and Jeff Bezos

Former NY Yankees Slugger Alex Rodriguez Reveals One Juicy Investment Tip

Why I Love Apple, Alphabet, Nvidia and These Other Stocks for September

Have Amazon, Google, Apple and Sony Flooded the Smart Speaker Market?