Stocks closed higher on Wall Street, capping a four-week rally. Energy companies were among the biggest gainers Friday as energy prices continued to recover. Devon Energy surged 11% and Anadarko Petroleum added 9%. Bank stocks also rose sharply. That sector had been beaten down in recent weeks as investors worried about loans to highly leveraged energy companies going bad. The gains nearly brought the market back to breakeven for the year. The Dow Jones industrial average rose 218 points, or 1.3%, to 17,213. The Standard & Poor's 500 index gained 32 points, or 1.6%, to 2,022. The Nasdaq composite climbed 86 points, or 1.9%, to 4,748. (More Dow Jones stories.)