Oil prices turned slightly higher despite news that the CME Group raised margins for U.S. crude futures by 25 percent, as traders focused on supply constraints. U.S. light crude rose above $103 a barrel, while in London, Brent crude rose above $117.
Elsewhere in corporate news, Google gained slightly amid news it would launch a music service similar to one created by Amazon.com .
Boston Scientific's shares slumped after news the CEO of the medical device maker would retire in Decmeber.
The dollar fell slightly against a basket of currencies, while the euro stabilized, although worries remain about Greece's debt troubles. Greece deniedit was seeking a new bailout package from the European Union. Also, an auction of short-term Greek debt went smoothly, which was encouraging to investors.
On the economic front, wholesale businesses increased inventoriesby 1.1 percent in March amid a jump in sales after a 1 percent gain in February, the Commerce Department said on Tuesday.
U.S. import prices rose 2.2 percentin April, following a 2.6 percent gain in March, the Labor Department said on Tuesday. Economists surveyed by Reuters had expected only a 1.8 percent rise.
Also, an index of small business owner sentiment fell 0.7 point to 91.2 in April even as sales performance improved. The drop in theNational Federation of Independent Business's small-business optimism index follows a 2.6-point drop in March.
China reported its trade surplus was $11.4 billion, nearly four times higher than expected, sparking fears that it could reignite criticism about its currency policy, but encouraging investors worried about a slowdown in China's growth.
Asian stocks closed higher while European shares rose, lifted by China's trade news.
On the Calendar This Week:
TUESDAY: Richmond Fed president speaks, 3-year Treasury note auction; Google developers conference, CIT Group shareholder meeting; earnings from Disney after-the-bell.
WEDNESDAY: Weekly mortgage applications, international trade, oil inventories, Atlanta Fed president speaks, 10-year Treasury note auction, Cleveland Fed president speaks, Minneapolis Fed president speaks, Treasury budget, AIG IPO roadshow, Comcast shareholder meeting, Senate judiciary hearing on AT&T merger; earnings from Arcelor Mittal and Toyota before-the-bell, and Cisco and Symantec after-the-bell.
THURSDAY: PPI, retail sales, jobless claims, business inventories, 30-year Treasury bond auction, money supply, NPD video game sales, Ford shareholder meeting, options industry conference; earnings from Kohl's and Macy's before-the-bell, and Nordstrom after-the-bell.
FRIDAY: CPI, consumer sentiment, Transocean shareholder meeting; Earnings from Petrobras
More on CNBC.com