North American stock markets closed lower Friday as France lost its AAA credit rating and traders worried whether Greece’s bond swap talks had collapsed.

The S&P/TSX composite index closed well off session lows, coming back from a 157-point deficit to lose 43.27 points to 12,231.06 while the TSX Venture Exchange lost 4.47 points to 1,536.03.

The Canadian dollar was also lower despite a strong domestic trade report, down 0.42 of a cent to 97.78 cents US as the greenback strengthened with investors moving into the perceived safety of U.S. Treasuries.

The Dow industrials lost 48.96 points to 12,422.06. The Nasdaq fell 14.03 points to 2,710.67 while the S&P 500 index was down 6.41 points to 1,289.09 after France’s finance minister announced that ratings firm Standard & Poor’s has cut its credit rating by a notch to AA.

France’s loss of its AAA rating deals a heavy blow to the eurozone’s ability to fight off its debt crisis. The country is the second-largest contributor to the currency union’s bailout fund and a lower credit rating often results in higher borrowing costs.

S&P in December put 15 eurozone countries on credit watch and other downgrades were expected.

The session had started off on a positive note. Traders had been relieved at successful government bond auctions in Italy and Spain on Thursday, which had raised hopes that policy-makers may finally be getting a grip on Europe’s debt crisis after months of procrastination and indecision.

On Friday, Italy had seen its borrowing costs drop for a second day in a row as it easily raised €3 billion.

“It’s really mixed news on Europe today — the downgrade is definitely negative,” said Jeff Bradacs, portfolio manager at Manulife Asset Management.

“But borrowing by Italy came in at lower rates than expected and that’s partially driven by European banks getting low funding costs through the ECB and buying the Italian bonds.”

Meanwhile, negotiations between the Greek government and its private creditors on a bond swap deal needed to avoid default appeared close to collapse Friday, with representatives of the bondholders saying they had been”paused for reflection.”

The deal, known as the Private Sector Involvement, or PSI, aims to reduce Greece’s debt by €100 billion by swapping private creditors’ bonds with new ones with a lower value, and is a key part of a €130-billion international bailout.

Without it, the country could suffer a catastrophic bankruptcy that would send shock waves through the global economy.

The downgrade report slammed the euro, which traded at US$1.2675 versus $1.2826 late Thursday.

The bad news combined to push the euro to its lowest level in 17 months, falling 1.2% against the U.S. dollar to $1.26.

Economic data also depressed markets after the U.S. Commerce Department reported the American trade deficit with the rest of the world increased 10.4% to US$47.8 billion in November, the highest level since June. Exports fell for a second straight month while imports rose to an all-time high, driven by rising demand for oil and foreign-made cars.

American exports dropped 0.9% in November from the previous month. Fewer shipments of autos and capital goods, such as aircraft and machinery, were the key reason. A decline in exports weakens U.S. growth and exports could drop even further in the months to come.

Meanwhile, Statistics Canada reported that Canada’s international trade balance improved dramatically in November, going from a deficit of $487 million in October to a surplus of $1.1 billion in November. The agency said exports increased 3.2%, led by energy and automotive products. Imports declined 0.8%.

There was also disappointment on the earnings front after J.P. Morgan Chase reported that its income fell 23% in the fourth quarter of 2011 after the bank set aside a large sum for litigation reserves and its investment banking income declined. The largest bank in the U.S. said Friday it earned US$3.7 billion, or 90 cents per share, three cents short of estimates. Its stock was down 3.5% at US$35.55.

The thinking is that if J.P. Morgan, widely considered one of the best managed U.S. big banks, had trouble in the fourth quarter of 2011, the rest of the industry may have trouble, too.

“J.P. Morgan is the gold standard,” said Phil Orlando, chief equity strategist at Federated Investors.

“So what happens to the banks that aren’t quite as strong and aren’t quite as well managed.”

On the TSX, the tech sector lost 1.4% as Celestica (TSX:CLS) fell 17 cents to $7.67 while Research In Motion Ltd. (TSX:RIM) shed 24 cents to $16.56.

Oil prices fell with the February contract in New York off 40 cents to US$98.70 a barrel. The TSX energy sector lost 0.65% with Canadian Natural Resources (TSX:CNQ) down 46 cents at C$37.91, while Imperial Oil (TSX:IMO) shed 68 cents to $45.25.

The base metals sector was down 0.73% as the March copper contract edged a cent lower to US$3.64 a pound. Teck Resources (TSX:TCK.B) declined 63 cents to C$39.35 while Ivanhoe Mines (TSX:IVN) ran ahead 99 cents to $20.27.

The gold sector was off almost one per cent while February bullion declined $16.90 to US$1,630.80 an ounce. Barrick Gold Corp. (TSX:ABX) faded 22 cents to C$49.44 and Goldcorp Inc. (TSX:G) fell 33 cents to $46.45.

Financials were also a weight on the TSX with Royal Bank (TSX:RY) down 68 cents to $52.09.

Industrials were also weak with Canadian National Railway (TSX:CNR) down $1.05 at $78.25.