Stocks rallied for a third day on Thursday as more data pointed to a stabilizing economy and changes to a bank-accounting rule that is seen as shoring up the volatile financial sector in the short term.

Another boost to sentiment came as leaders of the G20 announced an additional trillion dollars to support the International Monetary Fund and boost flagging trade.

Industrial, technology and consumer discretionary stocks were the biggest gainers after government data showed U.S. factory orders rose in February for the first time in seven months, adding to positive economic news earlier in the week.

The Dow Jones industrial average <.DJI> gained 216.48 points, or 2.79 percent, to end unofficially at 7,978.08. The Standard & Poor's 500 Index <.SPX> rose 23.30 points, or 2.87 percent, to 834.38. The Nasdaq Composite Index <.IXIC> climbed 51.03 points, or 3.29 percent, to 1,602.63.

(Reporting by Leah Schnurr; Editing by Jan Paschal)