Quantum computing company IonQ (IONQ +0.57%) has been a big winner for early investors. If you'd invested $1,000 in IonQ one year ago, you'd now have $3,689 (as of Oct. 27). A $1,000 investment in the S&P 500, on the other hand, would have grown to $1,180.
However, your IonQ investment would only be worth that much if you had held it through some serious volatility. That's why you should follow one important rule if you're going to invest in stocks, especially volatile ones like IonQ.
Image source: Getty Images.
Commit to holding for at least five years
Let's go back to that hypothetical $1,000 investment in IonQ a year ago. You would've seen your position initially lose money, go on to hit $3,000, and then plunge below $1,500 -- and that's all in the first five months. It's tempting to sell and take your profits when a stock is up big, or when it starts to come back down.
But once you sell, you miss out on any future gains that stock makes. For an example of how costly this can be, just talk to anybody who sold shares of Nvidia a few years ago. This isn't to say that IonQ is the next Nvidia, but if you invested in it so early, presumably you did so because you believed in its trapped-ion technology and future growth potential.

NYSE: IONQ
Key Data Points
A good rule of thumb is to plan on holding investments for five years or longer. I find this approach is most helpful with volatile assets, such as quantum computing stocks and cryptocurrencies. When you commit to a holding period going in, you have less pressure to sell because of price swings.
There are exceptions to every rule -- if a company goes through huge changes and no longer seems like a smart investment, it could make sense to sell, no matter how long you've owned it -- but for the most part, a buy-and-hold strategy is a great choice.