Artificial intelligence has driven the stock market to all-time highs over and over for the past several years.