New Delhi, Oct. 12 -- The bull market nobody saw coming turns four years old this week, powered by an artificial-intelligence boom that has created trillions of dollars in new investor value, launched a game-changing drive to develop new technology, and raised big questions about the risks of a bubble that could tear the rally down at a moment's notice.

The S&P 500 bottomed out from a vicious bear market in October 2022, when it tumbled nearly 25% from its prior peak following Russia's invasion of Ukraine, which prompted a global surge in oil prices. Investors were also contending with a Federal Reserve intent on normalizing interest rates after the central bank made emergency cuts tied to the Covid pandemic.

Its Oct. 12, 2022, close of...