North American stocks finished a wildly turbulent week with a boost of investor confidence that sent market indices up sharply on Friday.

The S&P/TSX composite index soared 848 points, or 7.03% to close at 12,912.99.

The upward swing was mirrored in stock markets in the United States and abroad after the U.S. government and Treasury announced efforts underway to rescue the financial system.

All 10 main groups within the TSX advanced Friday.

The energy group was up 8.9%, with shares of Canadian Natural Resources soaring 11.9% to close at $87.31.

Crude oil for October delivery gained US$6.67, or 6.8%, to close at US$104.55 a barrel on the New York Mercantile Exchange. It gained 3.3% for the volatile week.

Rising oil prices helped the Canadian dollar gain more than a cent, closing at US95.24¢.

The financials group increased 5.7% throughout the day. This included hefty gains at some of the big banks, including 7.2% for Royal Bank of Canada, which closed at $51.43, and a 9.6% boost for TD Bank, which closed at $64.94.

The materials group rose 9.6% on Friday. This included a 9.6% increase in shares of Potash Corp. as strong demand continued to push up fertilizer prices.

The TSX gold sub-index increased 6.3% even though gold futures shed some of their gains from the week. Gold for December delivery closed down US$32.30, or 3.6%, at US$864.70 on the Comex division of the Nymex.

In the technology group, Research in Motion also benefited from news of the rescue plan, since an ease on the credit crunch could boost consumer confidence and prevent the scaling back of technology spending. RIM stocks increased the most in 14 months, up 13.5% to close at $109.50.

The junior S&P/TSX/S&P Venture composite index increased 71 points, or 4.8% to finish the day 1,549.22.

Strong gains on the major U.S. stock indexes pushed them roughly back to their starting point for the week, during which the Dow Jones Industrial Average shed roughly 800 points in the first three days of trading.

The Dow Jones industrial average finished up 368.75 points, or 3.35%, to close at 11,388.44. The S&P 500 closed up 48.57 points, or 4.02%, at 1,255.08. The tech-heavy Nasdaq composite index ended the day up 74.8 points, or 3.4%, finishing at 2,273.9.