Day traders can do the darndest things.

This week has provided the tale of a huge demo-trading platform mixup, and it’s on par with the story of the guy who launched a GoFundMe drive after a short bet went horribly wrong.

Harouna Traoré was making trades with Valbury Capital last summer — on a try-out version of the British brokerage’s platform, he thought. But the French day trader discovered that in fact, he had been placing actual orders worth 1 billion euros ($1.2 billion), according to a Financial Times report.

Traoré, who opened an account with $23,000, found himself in the hole by more than $1 million. But he managed to turn that real loss into an actual profit of more than €10 million ($12 million), as he built up a $5 billion position in U.S. stock futures, the FT report on Thursday said.

Yet Traoré is not necessarily on easy street after his successful bets. Instead, he is locked in a legal battle with Valbury over the roughly $12 million gain — an amount about equal to the U.K.-based brokerage’s entire annual revenue.

Valbury told him it had treated the trades as an error because Traoré had thought he was using a demo platform. The brokerage also told him that he had exceeded his trading limits, according to court filings that the FT examined.

Don’t miss:When can the S&P 500 break out of this tight trading range?

And read:Confused about these investing terms? You’re not alone

Early Friday, U.S. equity futures US:ESU8 US:YMU8 were rising. On Thursday, the Dow Jones Industrial Average DJIA, -0.28% suffered its eighth down session in a row, as the S&P 500 SPX, -0.05% and Nasdaq Composite COMP, +0.22% lost ground as well.

A Tale of Two Hong Kong Traders

This is an updated version of a story first published on June 21, 2018.