I've made lots of investing mistakes over the years. Many of them included buying a money-losing stock. However, some of the worst mistakes I've made haven't been on the purchase but the sale. I've left a considerable amount of money on the table by selling a stock too early.

One of my biggest missed opportunities was selling First Industrial Realty Trust (FR -0.96%). Here's a look back at what I learned from that mistake.

A person looking at a red stock chart on a tablet.

Image source: Getty Images.

Giving up way too soon

I bought shares of First Industrial during the latter part of the Great Recession in 2009. At the time, I paid $33.33 a share for the industrial-focused real estate investment trust (REIT). I'm not exactly sure why I bought shares at the time. It probably had something to do with the eventual recovery of the commercial real estate market following the financial crisis.

My thesis doesn't matter, considering that I would go on to sell the shares less than a year later at a mere $6.19, locking in a more than 80% loss. My only consolation is that I owned shares in a taxable account, so I was at least able to write the loss off on my taxes.

That loss stings badly because of how First Industrial performed since I gave up on the stock. Shares are up 880% from the day I sold, a 21.4% annualized return. Add in the dividend, which First Industrial reinstated in 2013, and the total return is more than 1,130%, pushing the annualized return to 23.8%. I would have earned an over 1,000% total return if I held on. That would have turned my $1,500 investment into over $15,000. This missed gain is much larger than my biggest loss on a stock purchase. 

From recovery to the hottest property class around

Two factors fueled the stunning return generated by First Industrial over the years. First, the industrial REIT recovered from the challenges it faced during the financial crisis. While the company had to pause its dividend for several years, that enabled it to retain cash to shore up its financial situation. That gave it the flexibility to start expanding again as market conditions improved.

The other big return driver is the more recent strength of the industrial real estate market. Steadily rising e-commerce sales are driving the need for more warehouse space. Meanwhile, current supply chain issues have forced companies to rethink their inventory management strategies, driving additional demand for warehouse space. Because of these strong market conditions, First Industrial has benefited from steadily rising rental rates at its existing properties.

And the REIT has been able to develop additional warehouses to capture strong customer demand. In the last six years alone, First Industrial has invested $1.1 billion on development projects, creating an estimated $868 million, or $6.87 per share, of net asset value. These catalysts have helped drive steady growth in its funds from operations and dividends per share, creating significant shareholder value.

Lessons learned from my worst investing mistake

The most important takeaway from selling First Industrial way too early is that I need to have a much longer-term mindset. I held shares for less than a year, which wasn't enough time to allow the company to turn things around. I now aim to own a stock for three to five years, giving the company the time to get back on track. While I will sell earlier if it's clear the investment thesis will never play out, I've learned that patience can be a virtue.

Another lesson I learned is that I need to have a clear reason for selling other than the fact that the stock is down a lot. In some cases, a big decline can be a reason to add to a stock, not sell it. While adding to your winners has been a winning investment strategy, there are times when it makes sense to double down on a stock when the sell-off is market-driven and not due to a fundamental flaw with the company.

I've taken these lessons to heart, which has paid big dividends over the years. While not all my losing investments have recovered, I've held on to some stocks that have performed spectacularly after a big decline. Meanwhile, I've added to those gains by selectively doubling down on stocks I believed would eventually recover.

So, while First Industrial was a costly lesson, it has made me a better investor over the years.