Every year in early July, thousands of people “run with the bulls” in Pamplona, Spain. While the event is exciting, it is also hazardous, and many runners have been badly injured over the years. As an investor, running with the herd may be just as dangerous for you— if you’re constantly following what everyone else is doing, your own financial goals could end up getting “trampled.”

According to anthropologists, the urge to run with the herd, or follow the crowd, may have been hard-wired into our psyches. In prehistoric times, running with the pack may have helped minimize danger or increase the chances for finding food. Today there are far fewer rewards for following a herd mentality — especially in investing. Consider what happens when the financial markets go through a period of volatility. Many investors flock to gold, apparently believing that the shiny yellow metal will always be valuable and that its price will never drop. Yet, the fact is that gold prices, like those of other financial assets, do fluctuate. And certain types of gold-based investments can be quite risky in their own right.

What other “follow the herd” movements should you avoid when you invest? For one thing, try to stay away from “feeding frenzies.” If you look back about 15 years, you may remember the buzz that surrounded speculative technology stocks, many being companies with futuristic names, but lacking profits or business strategies. For a few years, the prices of these companies soared, but in 2000 and 2001, the “dot-com” bubble burst, splattering investors with big losses that were either irreversible or took years to recover.

The herd mentality often applies even when investors know the right moves to make. One of the most basic rules of investing is “buy low, sell high” — and yet many investors do the exact opposite. When prices drop, they sell to cut their losses — even though they may be selling investments that still have strong potential. Alternately, when an investment’s price has shot up, these same investors will often keep buying more shares, hoping to reap even bigger gains — even if the investment has now become quite expensive, as measured by the price-to-earnings ratio, and has little upside potential remaining.

Instead of emulating other investors, think about your own financial goals and create a viable strategy for achieving them, taking into account your risk tolerance and time horizon. Look for quality investments and hold them for the long term. Don’t be discouraged by the inevitable market downturns, but be ready to adjust your portfolio as needed. Be patient and disciplined, always keeping your eye on your ultimate objectives.

It may feel comfortable in the midst of a herd, but it can lead to places where you don’t want to go as an investor. Steer clear of the crowds and go your own way.