Compound interest is a relatively straightforward concept. Nevertheless, it's easy for investors (especially those just starting out) to underestimate the power of compounding. That was certainly the case for me when I first began investing.

This is the story of one of my earliest investments -- in Amazon.com (AMZN -1.64%). On an annualized basis, I made a phenomenal 730% return. But on the whole, my early dabbling with Amazon represents the biggest blunder of my investing career. Here's why.

An aerial view of an Amazon fulfillment center

Image source: Amazon.com.

How not to invest

I first started investing in 2004. At the time, I was a sophomore in college, and between a small inheritance and summer earnings, I cobbled together about $15,000 to invest.

To put it mildly, I had no clue what I was doing. I wasn't a finance major, nor had I done any outside reading about investing strategy. I didn't know how to read an earnings statement, analyze a balance sheet, or evaluate a company's cash flow. I didn't even fully understand where to look for information about potential investments.

As best I can recall, my strategy -- if it can even be called that -- was to buy stocks trading near 52-week lows and sell them when they moved back toward the middle of their 52-week trading ranges. In short, the idea was to buy stocks that might be slightly undervalued and get out with a small profit as quickly as possible.

A bad strategy in action

In October 2004, a little more than two months after I opened my first brokerage account, I decided to buy Amazon shares. As a college student, I had used Amazon.com a few times that year to order textbooks and other items. Like most people at the time, I thought of Amazon as an online version of Barnes & Noble, and didn't give much thought to its potential to expand well beyond selling books and other media.

I bought 150 shares of Amazon stock on Oct. 28, 2004: a Thursday. I paid $34.35 per share, bringing the total cost of my purchase to $5,163.49 including commissions. (This was long before the days of commission-free trading.) My entry price was near the stock's 52-week low. Earlier in the year, Amazon stock had traded as high as the upper $50s.

AMZN Chart

Data source: YCharts.

The stock quickly rebounded from its late-October lows. In fact, by late December, it was back to around $45. However, I didn't stick around that long. I sold my shares on Nov. 1 and Nov. 2: less than a week after I had bought them, fetching an average price of $35.45. After commissions, I netted $5,294.88 from the sale.

This gave me a profit of $131.39 after paying about $33 of commissions and trading fees. On the one hand, this represented a modest 2.54% return on my initial investment. On the other hand, since my average holding period was not even five calendar days, I could have theoretically compounded this return about 84 times in a year. On an annualized basis, that put the return on my Amazon stock at a staggering 730%.

If I had instead held those 150 shares until today, my annualized return would have been "only" 33%. However, with a holding period of nearly 16 years -- instead of four to five days -- my $5163.49 investment would now be worth around $450,000.

AMZN Chart

Data source: YCharts.

Invest for the long term

Two years after my initial blunder, I had a chance to correct my mistake. In September of 2006, I bought 100 shares of Amazon for $30.42 each: an even lower price than I had paid in 2004. Unfortunately, my patience had improved just slightly over the previous two years. This time, I held the stock for almost two weeks, walking away with a $201.91 profit. Once again, my annualized return was phenomenal (602%), but my actual gain of 6.6% after commissions was nothing to write home about.

The lesson from my experience as a novice investor should be pretty clear. Theoretically, an investor could earn triple-digit annual returns by banking single-digit gains on a different stock every week, but as a practical matter, your chances of sustaining a winning streak like that are near zero.

By contrast, if you buy a portfolio of companies with massive growth potential, holding for many years -- or even decades -- the gains from a few big winners (like Amazon) could power market-beating returns. Indeed, while I have been fortunate to identify a handful of multibaggers over the past decade, the gains I made from all of them combined pale in comparison to what I missed out on from selling Amazon stock (twice!) for a small profit. Patience is perhaps the most important virtue in investing -- and that's a lesson I had to learn the hard way.