* Euro headed for worst week since October
* Dollar backs off four-month lows vs yen
* Strategists say dollar weakness here to stay despite rally
* Graphic: World FX rates in 2018 http://tmsnrt.rs/2egbfVh
LONDON, Feb 9 (Reuters) - The dollar rose on Friday to extend its recent gains while the euro was headed for its worst weekly performance since Nov. 2016 after the global stock market sell-off squeezed investors positioned for a weaker greenback.
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.
After earlier rising, the euro slipped and was down 0.1 percent at $1.2234 at 1215 GMT, bringing weekly losses to 1.7 percent. So far this year, the euro remains 2 percent higher. It hit a three-year high of $1.2538 in late January.
More broadly, the dollar against a basket of currencies was up 0.3 percent and has now gained 1.4 percent this week, the best performance since November 2016. The U.S. currency remains down 1.8 percent this year, however.
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 dollar recovered some ground 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 slump in stock prices continued in Asia and Europe on Friday.
The U.S. House of Representatives joined the Senate in approving a bill to end an overnight federal shutdown, averting serious interruption of the government's business that could have hit sentiment towards the dollar.
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.
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 and Norwegian price growth in January came in weaker than expected.
"We remain constructive on the Norwegian krone given its still-huge undervaluation according to our models...but will probably wait for more evidence of rising inflation at home and more-stable markets before proposing this trade again," UniCredit strategists said in a note.
The euro was up 1.3 percent at 9.8275 after the krone earlier weakened to its lowest level since December.
Emerging market currencies as well as commodity-linked currencies like the Canadian and Australian dollars, which have enjoyed a strong run against the U.S. currency, have also been hit by this week's turmoil.
The Swiss franc, another currency investors turn to as a perceived safe haven, hit a near four-month high against the euro at 1.1460 francs before falling back to trade at 1.1475.
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 (Editing by Peter Graff)