The hottest investment of the first half of the year wasn’t Amazon.com, Netflix, or even Tesla. In fact, your broker probably isn’t pitching it, and it is barely even recognized by the Securities and Exchange Commission. Yet cryptocurrencies—the most famous of which is Bitcoin—are shooting out the lights.

Investors...