JOHANNESBURG (Reuters) -South Africa's rand strengthened on Thursday thanks to current account data recording its largest surplus ever in the second quarter, while stocks were hammered as investors exited tech companies after China's government summoned gaming firms.

At 1550 GMT the rand traded at 14.1400 against the dollar, around 0.37% stronger than its previous close.

A major driver of the record Q2 current account reading was that the trade balance notched up a surplus of 613.7 billion rand ($43.39 billion), up from 450.8 billion rand previously and also an all-time high, on higher key commodities prices and buoyant global demand.

"As was the case in previous quarters, the magnitude of the surplus once again surpassed expectations," said Pieter du Preez, a senior economist at NKC African Economics.

"We expect the current account to remain in surplus territory over the near term as the elevated commodity price environment buoys exports. Therefore, we forecast the current account to record a surplus in 2021, before moving back into deficit territory during H2 2022."

In the equities market, tech investor giants Naspers and its unit Prosus slumped 7.82% and 6.30% respectively after online gaming chiefs, including Tencent Holdings, were summoned by Chinese authorities to check they are sticking to strict new rules for the sector.

Prosus holds close to 29% of Tencent.

Overall, the Johannesburg All-share index fell 2.06% while the Top 40 index declined 2.29%.

($1 = 14.1445 rand)

(Reporting by Nqobile Dludla; Editing by Jan Harvey and Mark Heinrich)