A sign that an agreement may be in the works to head off a possible default by the U.S. government was enough to push North American markets sharply higher Thursday.

The S&P/TSX composite index ran up 164.08 points to 12,894.41 after House Speaker John Boehner said Republicans are offering legislation that will allow for a temporary increase in the debt ceiling.

New York indexes had their second-best day so far this year as the Dow Jones industrials surged 323.09 points to 15,126.07, the Nasdaq shot up 82.97 points to 3,760.75 and the S&P 500 index rose 36.16 points to 1,692.56.

Boehner said the proposal involves extending the government's ability to borrow money through Nov. 22 — but only if President Barack Obama agrees to negotiate over ending the partial government shutdown and a longer-term increase in the debt ceiling. Under the Republican plan, the partial government shutdown would continue.

A clear resolution was not reached despite efforts during a late afternoon meeting at the White House.

The Canadian dollar slipped 0.02 of a cent to 96.19 cents US.

Any positive sign is enough to boost markets

The strong gains followed a string of declines that reflected a growing sense of unease as the U.S. heads toward an Oct. 17 deadline when the government starts to run out of money to pay creditors.

"They (investors) don't really care whether it's a structural fix or a long-term fix or another push off the fiscal cliff, if it's any type of positive tone in terms of willingness to negotiate in good faith," said Kevin Headland, director, portfolio advisory group at Manulife Asset Management.

Markets have been under pressure since Oct. 1 when a budget impasse resulted in a partial shutdown of the U.S. government.

Republicans have been demanding changes to Obama's signature health-care legislation and spending cuts in return for a funding measure that would reopen the government and increase the debt limit.

Prices for oil and copper advanced on word of the possible Washington gridlock fix.

The energy sector led advancers, up almost two per cent as the November crude contract on the New York Mercantile Exchange moved up $1.40 to $103.01 US a barrel. Cenovus advanced 77 cents to $30.88 Cdn.

Canadian Natural Resources climbed $1.43 to $33.46 Cdn after the oil and gas giant provided a sneak preview at its third-quarter results.

Canadian Natural said its cash flow from operations during the quarter came in at about $2.21 per share, better than the $1.94 analysts polled by Thomson Reuters had on average been expecting. The company reports full earnings Nov. 7.

Financials up 1.6%

The base metal sector was up 1.63 per cent with December copper up two cents at $3.25 US a pound. First Quantum Minerals climbed 48 cents to $18.60 Cdn while Thompson Creek Metals climbed 19 cents to $3.41.

Financials gained 1.55 per cent as Royal Bank rose $1.29 to $67.69.

The industrials component ran up 1.4 per cent and Canadian National Railways (TSX:CNR) rose $1.91 to $109.85.

The tech sector moved up 1.33 per cent. BlackBerry shares closed up five cents to $8.49 on word that the smartphone company's co-founders, Mike Lazaridis and Douglas Fregin, are looking at making a potential takeover bid. Fairfax Financial, BlackBerry's largest shareholder, has already made a conditional takeover bid for the company worth $9 per share that values the company at $4.7 billion.

Wi-LAN Inc. shares rose 19 cents to $4.09 after it said it has reached a settlement in its patent dispute with Sierra Wireless Inc. The Ottawa-based patent-licensing company says Sierra has agreed to enter into a multi-year licence for Wi-LAN's patent portfolio.

Meanwhile, the gold sector fell 0.7 per cent as December bullion dropped $10.30 to $1,296.90 US an ounce. Goldcorp faded 39 cents to $25.25 Cdn.

JPMorgan sells off short-term U.S. debt

Traders will find some distraction from U.S. debt woes Friday as banking giants JPMorgan Chase and Wells Fargo post quarterly results.

 And the Canadian dollar could find some movement from the September employment report. Economists expect Statistics Canada to report that about 16,000 jobs were created last month.

However, in a sign that nervousness still prevails over how the debt showdown would play out, investment banking giant JPMorgan Chase said Thursday it has sold all of its exposure to short-term U.S. government debt out of its money market funds.

The announcement followed similar moves by other money market mutual fund managers and came a day after Fidelity Investments, largest manager of money market mutual funds in the U.S., said it no longer holds any U.S. government debt that comes due around the time America could hit its borrowing limit.

In a statement Thursday, JPMorgan said its money market funds no longer held any U.S. Treasurys that mature or have payments scheduled between Oct. 16 and Nov. 6. The New York bank said it has also increased its liquidity position in the funds.  JPMorgan holds about $257 billion US in its money market funds, according to its website.

With files from The Associated Press