Tech stocks surge as wave of interest in AI drives $4tn rally