The Dow Jones Industrial Average rose 164.84 points to 17,721.25.
The S&P 500 climbed 19.73 points to 2,061.72, while the Nasdaq added 37.34 to 4,496.04.
Oil prices surged during the day with US crude reaching $41.96 per barrel, its highest level for the year.
As a result petroleum stocks rose. Mid-size producer ConocoPhillips was up 5.5%, while Apache climbed 6.7%.
Bank shares moved up ahead of earnings reporting that starts Wednesday with JP Morgan . Its shares were up 1.8%.
Bank of America stocks climbed 2.3%, while Wells Fargo was up 1.6% - both companies report first quarter results on Thursday.
The International Monetary Fund cut its global growth forecast, but investors said it was expected.
The IMF now predicts global growth of 3.2%, a cut of 0.2 percentage points from its previous forecast. It said Brazil's economic troubles, worsening outlook for emerging economies and slow growth in developed countries were to blame.
"If you're trading based on the economic forecast from the IMF, your view is going to be lagging, not leading the market," said Michael James, managing director of equity trading at Wedbush Securities.
(Close): US shares rose on Tuesday as the price of oil shot up following predictions that Saudi Arabia and Russia were close to a deal to cut petroleum production.