LONDON - Developing countries have been on a borrowing binge this year with nine months of bumper investment inflows and record bond sales, but a sharp U.S. dollar bounce into year-end could end the party early.

Signs of an upswing in the dollar's fortunes made the last week of September poor - equities fell 2 percent, bond yields rose about 10 basis points and currencies weakened on average by over 1 percent, their worst week since last November.

While emerging markets are still among the year's best performing assets, the moves last week cast a chill on the sector. They closely emulated those in late-2016 when Donald Trump's U.S. election win and stimulus plans briefly boosted the dollar, ended a three-quarters emerging market rally.

Last week's swings were driven by expectations of a December U.S. rate hike. But possibly, a bigger threat is the revival, after many months, of the so-called Trumpflation bet - Trump's plans for stimulus through tax cuts.

The measures could be immensely dollar-supportive, especially if they induce U.S. firms to repatriate cash held overseas. Estimates of such holdings are reckoned to be well over $1 trillion.

That could see the dollar repeating the 12 percent surge it witnessed in 2005 .DXY , after a 2004 tax holiday lured home about $300 billion. That's a formidable hurdle for emerging markets, which usually suffer when the dollar strengthens.

"The last time they did it (encouraged dollar repatriation), it had a huge impact on the dollar and this time the scale could be much larger," Abhishek Kumar, lead portfolio manager for emerging markets at State Street Global Advisors.

On top of that, emerging markets look "frothy in some areas", Kumar said, citing the fall in corporate dollar bond yields below those on sovereign debt, and successful bond issuance by junk-grade borrowers Tajikistan and Ukraine.

Such frontier market, along with Chinese firms, led a borrowing frenzy that saw bond sales of almost $500 billion in the first nine months of 2017, a quarter above year-ago levels.

Yield-hungry bond investors submitted orders of over $4 billion for Tajikistan's $500 million issue, despite its doubtful economic prospects. A $12.5 billion deal from Saudi Arabia - in recession and struggling with huge budget deficits - enjoyed bids around $40 billion.

But while such entities benefited from Treasury yields - the reference rate for global borrowing costs - bumping along near multi-year lows, Kumar predicts U.S. tax changes to have "material" impact on the U.S. curve.

Higher U.S. yields, crowding out flows to riskier assets, can drive an exodus from emerging markets, especially when long-dated bond yields rise faster than shorter-maturity debt.

A taste of such curve steepening, as these yield moves are known, came last week as the Treasury curve steepened the most since August. That forced up yields on the new Saudi bonds by around 15 basis points.

"We think we may see a moderation of inflows into emerging markets in the fourth quarter and going into 2018," Hung Tran, managing director of the Institute of International Finance (IIF) said, though he did not see flows reversing.



DEBT MOUNTAIN

While some argue that with global interest rates still low, a moderate rise will not be an issue, emerging markets are facing the prospect of tighter credit with record-high debt.

The IIF estimates total developing world debt at $56 trillion, up $3 trillion in the past year. That is 218 percent of their combined economic output, a five percentage point rise over year-ago levels.

On a more positive side, governments have moved to borrowing mostly in domestic currencies, reducing dollar exposure. Only 14 percent of public emerging debt now is foreign currency, the Bank for International Settlements says.

Paul Greer, senior emerging debt trader at Fidelity International, says this segment should be relatively insulated; he calculates inflation-adjusted bond yields from the eight biggest emerging economies at some 300 basis points above developed markets, the widest in a decade.

Unsurprisingly, local emerging debt has outperformed its dollar counterpart this year, with 14 percent returns.

On dollar bond markets, large amounts of debt fall due in coming years: governments must repay $70-$75 billion in 2018 and 2019, rising to $95 billion in 2020, ICBC Standard Bank estimates.

Emerging markets meanwhile face around $250 billion in repayments in each of the coming three years. All was borrowed during the cheap-money years after 2009, but refinancing it may prove much costlier.

Greg Bowes, co-founder of Albright Capital Management, an emerging markets-focused private equity firm, expects many companies will seek debt restructuring.

"You've had a dramatic increase in the size of the EM corporate credit market in the last six years," Bowes said.

"A lot of that debt issuance is approaching maturity and we're at this trough in interest rates, so it will be interesting to see how that unfolds." (Reporting by Sujata Rao; additional reporting by Claire Milhench Editing by Jeremy Gaunt) ((sujata.rao@thomsonreuters.com; 44 20 7542 6176 ; Reuters Messaging: sujata.rao.thomsonreuters.com@thomsonreuters.net))