* Toronto market seen vulnerable to looming global threats * Resource stocks could be hit especially hard * Analysts still seen main index rising by yearend By John Tilak TORONTO, Feb 17 (Reuters) - The Canadian stock market looks set for a near-term pullback after a rally that took it to 18-month highs, and resource shares are likely to be especially vulnerable to fresh worries about the global economy. The triggers for a selloff may include renewed concern about the European economy or the U.S. battle over the federal budget, two themes that dragged on equity markets throughout 2012. Strategists and fund managers said earnings setbacks and disappointing outlooks from major companies could also spur investors to reconsider their recent optimism. "We're in a near-term window for price correction in global markets," said Myles Zyblock, chief institutional strategist and director of capital markets research at RBC Dominion Securities Inc. "Nothing goes up in a straight line, so we're at a high-risk entry point." The Toronto Stock Exchange's S&P/TSX composite index hit a 2013 high of 12,895.28 on Jan. 30, its strongest level since August 2011, and above many analysts' mid-year targets. The index is up 2 percent so far this year and more than 13 percent from the lows of 2012. Canadian stocks have benefited from a rally in global equity markets, which has prompted talk of a "great rotation" of money out of bonds and into higher-risk stock markets. Yet many think the move has gone too far for now. "We are susceptible to a correction, given the magnitude of the run that we've had for equity markets," said Sid Mokhtari, market technician and director, institutional equity research, CIBC World Markets. EUROPE FORGOTTEN, BUT NOT GONE Strategists said the resource-heavy TSX composite may be more vulnerable than the high-flying S&P 500 index to hiccups in the global economy's fragile recovery. The TSX, while outperforming the S&P 500 for most of the past decade, trailed the U.S. index in both 2011 and 2012. The S&P is up nearly 7 percent so far this year and has gained more than 13 percent since its November lows. Energy, mining and other natural resource companies make up more than 40 percent of the benchmark Canadian index, linking its fate closely to volatile commodity prices and the global economic outlook. "Long-term investors should certainly be prepared for short-term volatility at a minimum and even a pullback," said Craig Fehr, Canadian market strategist at Edward Jones in St. Louis, Missouri. "Maybe the most swift knee-jerk reactions in the market would be precipitated by some of the headline risk that could come from Europe." The European economy, which has been a major negative influence on global markets since 2008, is still in recession, and some investors are already fretting about the outcome of the Italian election later this month. Canadian equity investors were given a harsh reminder of this on Thursday, when data showing the economies of German and France shrank more than expected late last year sideswiped the Toronto market. The United States, Canada's biggest trade partner, is another source of worry. President Barack Obama and congressional Republicans have yet to resolve the budget battle over the so-called sequester, the package of automatic spending cuts scheduled to take effect at the beginning of March. "The dysfunction in the political side is still weighing on the market," said Gregory Nott, chief investment officer, Russell Investments Canada. "The market is still vulnerable to any negative surprises." ENDING YEAR HIGHER But most strategists still expect the TSX to end the year higher as economic worries recede and earnings slowly improve. China's impact on commodity prices makes it an influential factor on the Canadian index, and recent positive economic data from China has improved market sentiment. "With China seemingly engineering a soft landing rather than the hard landing, you've seen a dissipation of fears that commodities will fall sharply," said Bob Gorman, chief portfolio strategist at TD Waterhouse. Gorman expects the Canadian index to rise to about 13,200 by the end of 2013. It closed at 12,686.63 on Friday. RBC's Zyblock thinks the TSX composite could outperform the S&P 500 over the year as a whole, after lagging the last two years, helped by a more attractive valuation. The Canadian index trades at about 15.30 times earnings, compared with 15.88 for the S&P 500, according to Thomson Reuters data. "The TSX, based on traditional valuation metrics like price-to-book and dividend yield, looks a little more attractive at this stage than the S&P 500," he said. "You have a combination of fundamentals and valuations working in the TSX's favor right now."