Bitcoin’s price surged to a high within a few hundred dollars of $10,000, extending an eye-popping 2017 run for the digital currency and underscoring the ebullient investor sentiment sweeping global markets.

Bitcoin was trading at $9,647.92 Monday after surpassing $9,000 for the first time over the weekend. It took bitcoin just seven days to rise $1,000 to its latest round-number milestone, according to research site CoinDesk, its fastest such rise in the nine years of its existence. At the end of 2016, Bitcoin traded at $968.23,...