TORONTO — The Toronto stock market closed higher Friday after worries about the future of U.S. economic stimulus drove the TSX lower over the previous two sessions.The S&P/TSX composite index advanced 61.65 points to 12,701.63 with all sectors positive, except for tech stocks, while the TSX Venture Exchange advanced 10.71 points to 1,144.68.The Canadian dollar was down 0.2 of a cent at 97.96 cents US. It had earlier hit an eight-month low of 97.51 cents US amid data showing lower than expected retail sales and tame inflation figures.Retail sales fell 2.1% in December, led by a decrease in vehicle sales. That was much more than the 0.3% decline that economists had expected. The drop followed five consecutive monthly gains in retail sales.Excluding sales at motor vehicle and parts dealers, retail sales decreased by 0.9%.Meanwhile, Canada’s already low inflation subsided further in January. Statistics Canada says the consumer price index rose 0.5% in January compared with a year earlier, a smaller increase than the 0.8% gain in December and the smallest increase since October 2009.A strong earnings report from tech giant Hewlett Packard helped push New York indexes well into positive territory after two days of declines, sparked by the release of minutes from the Fed’s latest policy meeting. They showed that some policy-makers were worried that the bank’s US$85 billion in monthly bond purchases could eventually unsettle financial markets or cause the central bank to take losses.The Fed’s bond purchases, commonly known as quantitative easing, are designed to boost the U.S. economy by increasing liquidity in financial markets.“It’s definitely been a positive in reflating asset prices including the stock market,” said Patrick Blais, managing director and portfolio manager at Manulife Asset Management.“But the Fed is cognizant that it needs a sustainable economic backdrop to retrench completely so we expect that the risk (of winding up QE) has arisen but it’s not a given, it’s not confirmed and will depend on the progression of economic fundamentals.”The Dow Jones industrials gained 119.95 points to 14,000.57, the Nasdaq was ahead 30.33 points to 3,161.82 and the S&P 500 index advanced 13.18 points to 1,515.6.Personal computer maker Hewlett-Packard Co. on Thursday reported earnings of $1.2 billion, or 63 cents per share, down 16% from a year ago. Ex-items, HP would have earned 82 cents per share, well above the average estimate of 71 cents per share among analysts surveyed by FactSet. Revenue fell six% to $28.4 billion, about $470 million above analysts’ projections.In a show of confidence, HP had provided an earnings forecast for the February-April quarter that was higher than analysts’ projections and its stock ran ahead 12.28% to US$19.20.Investor sentiment also got some lift from data showing that a key survey of German business optimism rose sharply in February. The Ifo index rose to 107.4 from 104.3 in January. It was the fourth monthly increase in a row, well above the 104.9 points expected by financial market analysts and supported the feeling that Europe’s biggest economy can avoid slipping into recession.Friday’s figure followed an in increase in the ZEW index based on surveys of investment analysts released Tuesday.Commodity prices were mixed following a string of steep losses.Commodities have been punished by a U.S. dollar which strengthened after the release of the Fed minutes on Wednesday. Also, oil prices had been undercut by data showing U.S. oil inventories rose last week by a much more than expected 4.14 million barrels.The April crude contract on the New York Mercantile Exchange ticked 29 cents higher to US$92.71 a barrel after tumbling about US$4 over the previous two sessions. The energy sector gained 1.2% and Cenovus Energy (TSX:CVE) improved by 41 cents to C$32.78 and Canadian Natural Resources (TSX:CNQ) gained 38 cents to $30.37.The base metals sector was up 1.16% while March copper was down two cents at US$3.53 a pound after losing almost 10 cents over the previous two sessions. Lundin Mining (TSX:LUN) climbed 26 cents to C$4.86 while Sherritt International (TSX:S) gained 17 cents to $5.59.Lift was also provided by the financial sector, up 0.49% as traders look ahead to earnings from most of the big Canadian banks next week. Bank of Montreal (TSX:BMO) climbed 40 cents to $63.11 while Scotiabank (TSX:BNS) was up 42 cents to $60.34.Telecoms also advanced with Rogers Communications (TSX:RCI.B) ahead 68 cents to $48.85.The gold sector was up about 0.2% late in the morning as the April bullion contract declined for a third day, down $5.80 to US$1,572.80 an ounce. Iamgold Corp. (TSX:IMG) fell 36 cents to C$7.49 while Goldcorp Inc. (TSX:G) rose 31 cents to C$33.22.The latest declines in bullion prices were sparked by the Fed minutes because the central bank’s quantitative easing has supported gold. That is because the bond buying program has encouraged worries about rising inflation and gold is seen as a hedge against rising prices.The information technology sector was off 0.38% with BlackBerry (TSX:BB) down 65 cents to $13.48 after the stock was downgraded Friday to a sell rating from a neutral one by MKM Partners. It cited a lower likelihood of success for the new BlackBerry 10 operating system and lowered their price target from $12 to US$10 over the next 12 months.In other corporate news, after the markets closed Thursday, fertilizer giant Agrium Inc., (TSX:AGU) reported quarterly net earnings of $354 million, or $2.34 per share, beating expectations of $2.02 a share. Sales were $3.26 billion, in line with expectations and its shares fell $5.61 or 5.16% to C$103.14.