* Euro headed for worst week since October
* Dollar backs off four-month lows vs yen
* Strategists say dollar weakness here to stay
* Graphic: World FX rates in 2018 http://tmsnrt.rs/2egbfVh
LONDON, Feb 9 (Reuters) - The euro gained against the dollar on Friday but the single currency was still headed for its worst weekly performance since October after the global stock market sell-off squeezed investors betting against the greenback out of their positions.
Betting on a weaker dollar versus the euro has been one of the most popular trades this year, with a resurgent European economy fuelling expectations the European Central Bank will shrink its balance sheet sooner than expected.
Stephen Gallo, European Head of FX Strategy at BMO Capital Markets said the sell-off "in equity markets and risk assets has led to a healthy correction in FX markets, in the short dollar positions getting squeezed."
Gallo said that unless there was a fundamental shift in the health of the global economy, which this week's downturn in equity markets did not imply, the dollar remained in a "multi-year downward trend.
"Don't let this take your eye off the longer-term picture of dollar weakness," he said.
The euro was up 0.2 percent at $1.227, having lost 1.47 percent against the dollar this week. So far this year, the euro remains 2.28 percent higher. It hit a three-year high of $1.2538 in late January.
The dollar, against a basket of currencies, was flat on Friday after gaining 1.1 percent this week. The U.S. currency remains down 2.1 percent this year.
The dollar also recovered against the yen in early European trading after earlier falling to near four-month lows as investors sought out safety in the Japanese currency.
The dollar fell as low as 108.50 yen, nearing its four-month low of 108.28 on Jan. 26. It later edged up to 109.255 yen, a 0.5 percent gain, but was still down for the week.
There was limited market reaction after the U.S. Senate approved a budget deal including stopgap government funding bill, which was too late to prevent a federal shutdown that was already underway.
Before this week's market mayhem, one of the most popular trades in the currency market was to buy the euro on expectations of unwinding of stimulus by the ECB and to sell the yen on the view that the Bank of Japan will be the last to exit from its ultra-loose policy.
"Given the troubles in stock markets, market players will likely continue to reduce their positions for now," said Minori Uchida, chief FX analyst at the Bank of Tokyo-Mitsubishi UFJ in Tokyo.
Many market players are closing existing positions rather than making new bets as they look to reduce risk exposure during the pick up in volatility.
Equity market volatility has surged this week, and while foreign exchange markets have remained far calmer, the carnage this week has upended some popular trades. UniCredit said it was closing a short position in the euro versus the Norwegian krone after the sell-off penalized the previously buoyant currency.
The Swiss franc, another currency investors turn to as a perceived safe haven, also hit a four-month high against the euro at 1.146 francs before falling back to trade at 1.1518, down 0.5 percent on the day.
For Reuters Live Markets blog on European and UK stock markets see reuters://realtime/verb=Open/url=http://emea1.apps.cp.extranet.thomsonreuters.bi z / c m s / ? p a g e I d = l i v e m a r k e t s (Additional reporting by Hideyuki Sano in TOKYO; Editing by Peter Graff)