LONDON, Sept 7 (Reuters) - Industrial metals have flipped from boom to bust in the space of six months as the market focus shifts from supply-chain problems to the darkening demand outlook.

None, however, has imploded quite as spectacularly as tin, the London Metal Exchange (LME) three-month price collapsing from an all-time peak of $51,000 per tonne in March to a current $20,700.

A relatively small and illiquid market such as tin is always prone to bouts of wildness when price momentum turns and speculative positioning shifts.

This time around, however, volatility has been accentuated by a mass bear attack on the Shanghai Futures Exchange (ShFE) tin contract.

The weight of selling has wiped out a near two-year price rally and left tin back at levels last traded in early 2021.

Supply-side scarcity has been alleviated in recent months, but not to the extent implied by the scale of the sell-off, which may mean trouble ahead for the army of Chinese shorts.

BEAR ATTACK

Not many investment players participate directly in the London tin market, but those that do started reducing their long exposure almost as soon as tin hit its March high.

Investment funds have slashed their net long position from 2,241 contracts to just 74, according to the LME's most recent Commitments of Traders Report.

"Other financial institutions", a category that includes pension funds and insurance companies, are now net short to the tune of 171 contracts.

The shift in London positioning however pales by comparison with what has been playing out in the Shanghai market, where both trading volumes and open interest have exploded to record levels.

The Shanghai tin contract registered volumes of over three million tonnes in both June and July, a massive turnover given global tin production last year was just 378,000 tonnes and the LME contract with its multiple spreads traded 771,000 tonnes over the same two months combined.

Market open interest on the Shanghai contract has rocketed as the price has fallen, peaking at 121,353 lots in early July, compared with a previous all-time high of 79,699 in March 2020.

The huge increase in activity into a falling price has all the hallmarks of a concerted bear attack, often seen in other more liquid Chinese commodity markets but not up until now in tin, or certainly not on this scale.

Open interest has since fallen as the London tin price bounced off the $20,000-per tonne level last week. But at a current 89,727 lots, it is still massive and higher than any previous peak.

The Shanghai bear attack, in other words, may not be over.

THE END OF SCARCITY...

Tin dynamics have certainly shifted over recent months.

Last year's price rally has incentivised more supply, particularly from Indonesia, the world's largest exporter.

Outbound shipments started accelerating around the middle of 2021. Last year's exports were up 14% on 2020 and they have jumped another 10% to 51,200 tonnes in the first eight months of 2022.

Given state producer PT Timah reported a sharp 26% slide in production in the first half of the year, the inference is that higher exports are coming from Indonesia's unofficial sector.

Coupled with a return to normal operations at producers impacted by COVID-19 lockdowns, supply is looking a lot less stretched then it has been for most of the last two years.

Demand, meanwhile, is softening. Global semiconductor sales, a proxy for tin usage in circuit-board solders, are slowing. Sales in the second quarter rose by just 0.5% relative to the first three months of the year, with June sales down by 1.9% on May, according to the Semiconductor Industry Association https://www.semiconductors.org/global-semiconductor-sales-increase-13-3-in-q2-2022-compared-to-q2-2021/#:~:text=by%20Semiconductor%20Industry%20Association&text=1%2C%202022%E2%80%94The%20Semiconductor%20Industry,the%20first%20quarter%20of%202022.

The combination of improved supply and weakening demand impetus is manifest in looser physical markets and a rebuild in LME stocks.

Tin in Rotterdam is now commanding a premium over LME of $900-1,200 per tonne, down from a peak of $1,750 in July last year, according to Fastmarkets.

LME time-spreads are also signalling improved availability. The premium for cash over three-month metal hit $6,200 per tonne in February last year. It was valued at a benign $140 per tonne at Tuesday's close.

There are now 4,605 tonnes of tin in the LME warehouse system, up from a critically low 645 tonnes in November last year.

...EXCEPT IN CHINA?

Ironically, the only part of the global tin market that still looks short of metal is China.

The country turned net exporter last year as the rest of the world ran dry but it has flipped again in a big way. Imports grew to 15,700 tonnes in the first seven months of 2022 from 2,800 in the same period of 2021.

After net exports of 9,400 tonnes last year, China has imported a net 10,300 tonnes so far this year.

Low raw material availability and the price slump have persuaded many Chinese producers to extend summer maintenance schedules.

ShFE stocks have been falling even as LME inventory has been rising. There are 1,792 tonnes of metal in exchange warehouses, down from a year's high of 4,424 tonnes in June.

Shanghai Metal Markets estimates https://news.metal.com/newscontent/101935698/Domestic-Tin-Inventory-Fell-to-Lowest-Level-in-Three-Months-due-to-Tight-Supply-/ "social" stocks of tin have also slid to a three-month low of 3,530 tonnes.

None of which seems to have deterred the army of short-sellers in the Shanghai contract.

But Chinese commodity markets have a long history of such crowd surges and fundamentals are often swept aside in what becomes a giant momentum trade.

Tin may well be paying the price for hitting the headlines during its record-breaking rally.

Shanghai trading activity saw a step-change over the course of the first quarter of 2020, when the tin price bottomed out and began its long ascent to this year's high.

After dipping their toes in on the long side, speculators now appear to be taking the full dive on the short side.

However, the combination of big shorts and low stocks is rarely a happy one in commodity markets as seen most recently in the dramatic blow-up of the LME's nickel contract.

The tin price roller coaster ride isn't over yet.

The opinions expressed here are those of the author, a columnist for Reuters.

(Editing by Jan Harvey)