$4tn rally fuelled by rising enthusiasm for AI triggers a surge in tech stocks.