The Dow surged 186 points to 11,583.
The S&P gained 21 points to 1,284.
The Nasdaq rose 10 points to 2,329.
Advancing issues topped decliners by a 2-1 margin. Volume on the NYSE came to 5.4 billion shares. Trading on the Nasdaq was more than 2.2 billion shares.
Light, sweet crude rose $4.58 to settle at $126.77 on the New York Mercantile Exchange.
The Federal Reserve announced that it will will extend its emergency lending program for Wall Street banks, providing some confidence that investment banks won't suffer from cash squeezes.
Also today, President Bush signed the massive housing bill.
(Copyright 2008 by The Associated Press. All Rights Reserved.) AP-NY-07-30-08 1616EDT