Nvidia became the first company to reach $4 trillion in market value on Wednesday, a new milestone in Wall Street's bet that artificial intelligence will transform the economy.

Shortly after the stock market opened, Nvidia vaulted as high as $164.42, giving it a valuation above $4 trillion. The stock subsequently edged lower, ending just under the record threshold.

"The market has an incredible certainty that AI is the future," said Steve Sosnick of Interactive Brokers. "Nvidia is certainly the company most positioned to benefit from that gold rush."