Retail investors are playing a big role in the market in 2020, and Robinhood is one of the more popular online brokerages out there, especially for millennial investors. In May, the company said that 3 million accounts had already been created this year (its total number of users was 10 million in June), and that new investors made up half of that number. Robinhood investors have been known to be aggressive, chasing risky opportunities by investing in, say, airline stocks -- and even in companies that are in danger of going out of business, all for the sake of scoring a great return.

But activity like that pushes stock prices up, and the more they rise, the more shares speculative investors -- like many on Robinhood -- buy, out of the fear of missing out (FOMO). The lure of jumping on the bandwagon and riding a hot stock can be far greater than the fear that might otherwise accompany an investment trading at a whopping 130 times earnings, like Amazon (AMZN -0.32%) is today. FOMO is a dangerous reason to invest, and it could lead to significant losses later on.

Buying a stock simply because it's rising in value is risky

When it comes to buying shares of a company, context is always important. As the price goes up, whatever you're buying becomes more expensive and a worse deal than it was earlier (assuming, of course, nothing happened to justify a change in the price). Whether it's a stock or anything else, price can play an important role in determining whether something's a good buy. And it's not something you should ignore.

Bubble about to pop.

Image source: Getty Images.

But the problem is that as people see a stock rising rapidly, they sometimes panic that they're missing an opportunity. A good example of this is healthcare company Moderna (MRNA 1.12%). Its shares are up more than 225% already this year (the S&P 500 is up just 11%), as excitement surrounding a possible vaccine for the coronavirus has propelled the stock to heights it's never seen before.

There's plenty of reason to be optimistic; on July 27, the Massachusetts-based company announced it would be beginning the phase 3 study of its vaccine candidate, mRNA-1273. It hopes to enroll 30,000 people in the trial. If successful, the study would put Moderna one step closer to potentially getting its vaccine out and available to the public. The White House has already agreed to purchase 100 million doses from the company in a deal worth $1.5 billion. And that's just scratching the surface, as one analyst from Evercore ISI estimates that Moderna may take a 40% market share of what could be a $100 billion COVID-19 vaccine market.

But there are many variables to consider. Will Moderna's vaccine candidate be successful? Will it be the most effective or the safest option? Growth is far from a guarantee, but people are buying up shares of the company as if it's predetermined, likely due to all that hype. The risk is that if Moderna doesn't achieve strong market share or its vaccine proves to be ineffective (or simply less effective than others), its share price could crash in an instant. And the more expensive its stock is, the further it has to fall.

What should investors do?

Risk-taking Robinhood investors probably won't like the idea of buying and holding safe value stocks right now, but that's the best course of action today. Even Amazon looks too expensive right now, even though its business is one of the best in the world. A year ago, shares of Amazon were trading at more than 70 times their earnings, and that was already a steep price for the Washington-based company. It's doubled in price since then, and Moderna's quadrupled, while the S&P 500 is up just 22% in 12 months. 

If you love growth stocks, you may want to familiarize yourself with the price-to-earnings growth (PEG) ratio. It takes into account a company's future growth and its price-to-earnings multiple. At a PEG value of 1, a stock is a good buy given how much growth analysts are expecting from it. The lower the number, the better the buy. A year ago, Amazon's PEG was right around 1. Today, it's 2.3 -- nowhere near being a good buy on a PEG basis, even when you factor in its growth potential.

Understanding the PEG ratio can prevent you from being too bullish on a stock that has an underwhelming bottom line. Moderna isn't even profitable yet! What you can do in such cases (P/E doesn't work for companies with no earnings) is use the price-to-sales multiple, which in Moderna's case will tell you that the stock's trading at a steep 214 times its revenue for the past 12 months. A year ago, that ratio was about 45. And for comparison's sake -- Amazon's price-to-sales multiple is less than 6.

Investing due to momentum, or because of FOMO, is a surefire way to put your portfolio in harm's way. Next time you see a soaring stock and are tempted to buy it, you may want to take a moment to look at its fundamentals and some multiples, like those noted above, before making an investment decision.