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 - Get Report) 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 - Get Report) 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.

Within the blue-chip average, Bank of America ( BAC - Get Report), JPMorgan Chase ( JPM) and Intel ( INTC) finished within a pack of stocks leading Dow advancers.

"Those are all early-cycle sectors that tend to perform better as the economy picks up steam, and there are signs that the economy is improving -- it's just not hitting on all cylinders yet," Pavlik said. "But if you wait for the job market to turn around, you're going to miss these gains in the market because the job market lags economic improvement."

Boeing shares made the sharpest rise on average, adding 3.3% to $70.01.

Citigroup shares were the most heavily traded on the New York Stock Exchange, followed by Bank of America and Sprint Nextel ( S - Get Report).

The NYSE had a listed volume of nearly 5.5 billion, while the Dow saw volume of 185.8 million, compared with an average of 200.4 million.

Earlier in the day, the Department of Commerce reported an unexpected 0.2% decline in January wholesale inventories, though sales continued showing strength. Pavlik said lower inventories could be interpreted as a positive sign for future growth.

"With inventories low, any increase in demand going forward will mean better growth for future inventories," he said.

The U.S. Treasury's $21 billion auction of 10-year notes showed strong demand, nabbing a high yield of 3.735% with an above-average bid-to-cover ratio of 3.45. Indirect bidders, or foreign buyers, took 35% of the bids while direct bidders took 17.5%.

Prices across U.S. Treasuries weakened, lifting yields across maturities. The benchmark 10-year's note fell 5/32, raising the yield to 3.718%. The two-year note dropped 2/32, strengthening the yield to 0.907%; the 30-year fell 8/32, raising the yield to 4.688%.

Earlier, China said exports rose 45.7% in February, and imports grew 44.7%. However, the robust growth, which was even stronger than expected, raised some fears that China could increase tightening.

Shares of Facet Biotech ( FACT) rose $10.80, or 66.7%, to $27.01 on news that Abbott Laboratories ( ABT - Get Report) would acquire the company for $27 a share, or roughly $450 million.

Toyota ( TM) incentives such as no-interest loans and free maintenance lifted North American sales by roughly 50% since the beginning of March, despite safety recalls on more than 6 million U.S. vehicles. Still, concerns about unintended acceleration in the company's Prius model continued Tuesday on a new accident report in New York.

The Mortgage Bankers Association's Market Composite Index, which measures mortgage loan-application volume, increased by a seasonally adjusted 0.5% last week.

The Energy Information Administration's weekly inventory report revealed better-than-expected supply levels in the week ended March 5. Crude stockpiles added 1.4 million barrels, which was lower than the 2.1-million barrel build that analysts polled by Platts had been expecting. Gasoline stocks lost 2.9 million barrels, and distillates shed 2.2 million barrels. Analysts had been looking for a decline of 338,000 barrels to gasoline stocks and distillates supplies that were lower by 950,000 barrels.

Late Tuesday, the American Petroleum Institute reported a build of 6.5 million barrels in crude inventories for the week ended March 5.

The dollar was trading lower against a basket of currencies, with the dollar index down by 0.2%.

In commodities markets, crude oil for April delivery settled at $82.09 a barrel after adding 60 cents, and the April gold contract lost $14.20 to settle at $1,108.10 an ounce.

Overseas, Hong Kong's Hang Seng was unchanged, and Japan's Nikkei slipped 0.04%. The FTSE in London rose 0.7%, and the DAX in Frankfurt gained 0.9%.

-- Written by Melinda Peer and Sung Moss in New York.