No one invests to lose money, but investors afraid of losing money in the stock market are often worried about the wrong things. One of the most devastating risks to investing returns is something that's well within our control, but exceptionally difficult to rein in: emotion. We are human, after all. And when ones money is involved, our caveman DNA can take over. It rarely ends well. 

The bad news is that it can take years to learn how to take emotions out of investing. The good news is that anyone can avoid falling into easily avoidable traps -- you just have to be aware of their existence and think of how you can personally evade making similar mistakes. With that in mind, here are three ways to lose all your money in the stock market, and what you can do to avoid the unnecessary headaches.

A man with his face on his desk after losing money in the stock market.

Image source: Getty Images.

1. Thinking a stock is a sure bet

The old adage "invest in what you know" is great advice. It keeps you from overlooking risks that you don't know you don't know in areas outside of your expertise. But it can also be dangerous advice when it leads to a lack of investing humility and objectivity. I found that out the hard way with an investment in industrial biotech pioneer Amyris (AMRS). I have a degree in the field.

The company genetically engineers yeast to produce useful chemicals from agricultural sugars. Amyris was pioneering a relatively new approach to the field, which meant there was no technology ecosystem ready to support the company's ambitions. It was essentially on its own, but had struggled through production issues and failed to achieve the growth it initially promised to investors.

It was never an attractive investment based on financials alone, but things appeared to be turning a corner in late 2014 that set it apart from peers. Few analysts appreciated that the real boogeyman of industrial biotech was (and continues to be) reliable manufacturing and scaling up. Amyris made expensive mistakes and really did implement innovative process improvements, gaining the ability to scale 2-liter batches to 200,000-liter run without many surprises. It was a sure bet to me. What could go wrong? 

Spoiler alert: I overlooked some pretty obvious red flags. 

Amyris' toxic balance sheet left zero room for error. Debt conversions in the summer of 2015 opened the floodgates of dilution, which has continued today thanks to further production delays, slower-than-expected progress scaling manufacturing processes, and lower-than-expected demand for new products. I got burned.

AMRS Chart

AMRS data by YCharts.

The company is once again promising huge growth in 2017, but I've learned my lesson about valuing management's promises over simple financial analysis. 

2. Going all-in on story stocks

Blindly believing in the words of management can tank any investment. When shiny new story stocks emerge, it can be easy to want them to succeed, especially if the company is promising to solve a critical world problem. Communicating the benefits of a complex technology to the layperson is how entrepreneurs raise money to execute their ideas. Storytelling is an existential requirement for start-ups.

Unfortunately, some ideas never complete that critical execution phase -- sometimes because they're not technically sound, sometimes because the business model isn't conducive to generating profits. There are plenty of stocks that fit this bill, from the formerly bankrupt battery innovator A123 Systems to heavily financed cellulosic fuels start-up KiOR, and many private companies -- blood-testing start-up Theranos, anyone? -- too.

Not all story stocks end in disaster. Tesla, despite my concerns about its energy storage marketing and promises, is crushing life as a public company ahead of its much-anticipated Model 3 launch this year. It is overvalued by just about any metric except investor optimism.

Of course, it can be difficult for most investors without a technical background to poke holes in novel technology platforms. So how do you avoid the pitfalls of story stocks? Diversification is an investor's friend -- and that's especially true here. Simply put, don't put all of your hard-earned money into the next big thing. It very well could be, but the other outcome is losing all of your money from a story stock gone bust. That's not the way to live happily ever after with financial security. 

3. Trying to time the market

It's natural for new investors to pay too much attention to the daily movements of the stock market and their portfolio, but it doesn't help you to accumulate wealth any faster. When this leads to investments that attempt to time the market -- buy low and sell high! -- it can actually destroy wealth.

Let's say you wanted to time things just right before buying shares in General Electric (GE 1.74%), which is considered to be a relatively safe blue chip stock. When would you have pulled the trigger last week?

GE Price Chart

GE Price data by YCharts.

That's not even easy to answer in hindsight. Similarly, when would you have submitted a buy order in the last year?

GE Chart

GE data by YCharts.

The problem with trying to time the market is two-fold. If you wait to purchase shares until a bottom, then you risk buying before the actual bottom or missing out on operational updates, such as impressive earnings or a major acquisition. If you wait to sell shares until a peak, then you risk selling before the actual peak or holding on as shares give up their near-term gains. Frustration can result in panic selling or panic buying, which is never a good thing.

Instead of trying to time the market, it's best to simply buy solid companies at great prices and hold on for a very long time. For example, while General Electric stock moves up or down in any given year for any number of reasons, it has done a pretty good job of generating total returns -- share price and dividends -- over the long term. The best part? You didn't even have to do anything!

GE Total Return Price Chart

GE Total Return Price data by YCharts

What does it mean for investors?

It's definitely not easy to take emotions out of investing. I've been investing for nearly 10 years and I still take the bait for investing traps from time to time. The important thing is being consciously aware of the pitfalls of certain actions or imperfect investment theses, and acting accordingly. With much practice, you'll discover one of the most ironic truths to successful investing: Doing nothing is one of the best things you can do.