2021 could go down on Wall Street as the year of the meme stock. If you've watched the wild ups and downs of stocks like GameStop (GME 7.58%) or AMC Entertainment Holdings (AMC -3.25%), you might be tempted to get in on the action. As of Friday, GameStop shares were up almost 900% year to date. AMC shares were still up by nearly 1,800%.

Those astronomical returns, of course, come with significant risks -- illustrated by the fact that GameStop closed Friday's session down more than 47% from its 2021 high, and AMC was down by almost 35% from its peak. So if you're thinking of investing in meme stocks, you'll want to follow these five tips to keep your money safer.

A person smiles while looking at their smartphone at night.

Image source: Getty Images.

1. Develop an investment thesis

A meme stock is a stock that has generated lots of hype in online discussion groups and on social media, mostly among retail investors. Usually, they're stocks that have fallen out of favor with Wall Street, though that doesn't necessarily mean they're bad investments.

To avoid being swayed by all the noise, make sure you have an investment thesis before you put money into a meme stock. For example, maybe you believe movie theater attendance will improve drastically as the threat of COVID-19 dissipates, so you believe AMC will return to profitability. Or perhaps you think that Beyond Meat (BYND -0.17%) can gain market share and deliver superior returns as it reduces costs and expands its lines of chicken and pork substitute products.

The bottom line: Have a solid reason for investing in a meme stock beyond the internet hype.

2. Build an emergency fund first

Meme stocks are highly volatile, which only adds to the arguments in favor of having a dedicated emergency fund large enough to cover at least six months' worth of your expenses before you invest. That cash cushion should protect you from having to sell those shares -- potentially at a big loss if the timing is bad -- should you encounter a major expense or if your income takes a hit.

Also, avoid meme stocks if you're not already funding a retirement account separately with buy-and-hold stocks and funds. Meme stocks are more speculation than investment. You shouldn't count on them to fund your golden years.

3. Limit your meme stock exposure to 5% to 10% of your portfolio

A good rule of thumb is to limit your overall exposure to risky assets to 5% to 10% of your investment portfolio. That doesn't mean invest 10% of your assets in GameStop (GME 7.58%), then another 10% in AMC, then another 10% in cryptocurrencies. All speculative assets combined shouldn't account for more than 10% of your total portfolio.

4. Avoid taking short positions

If you're bearish about a meme stock, you may be tempted to bet against it by taking a short position. But the notorious short squeezes of GameStop and AMC show just how risky this tactic is.

When you invest in a stock, the worst-case scenario is that the company goes bankrupt and you lose 100% of your investment. But when you go short, there's no limit to your potential losses because there's no limit on how much a stock price can soar. If you go short on a stock that rallies, you could be forced to pay an exorbitant amount to close out your position.

5. Don't forget about the IRS

The big risk of investing in meme stocks is that you could lose most or all of the money you invest in them. But there's also the possibility that you'll earn huge profits -- in which case, the IRS is going to demand a cut.

Traders are attracted to meme stocks by the chance for astronomical short-term returns. But whenever you hold a stock for a year or less, any profits you earn are considered short-term capital gains, and those will be taxed at your ordinary marginal income tax rate, which could be up to 37%. When you sell a stock you've held for at least a year and a day, whatever profits you make are viewed by the tax code as long-term capital gains, and taxed at lower rates -- 0%, 15%, or 20%, depending on your income.

Should you invest in meme stocks?

If you have some extra cash, there's nothing fundamentally wrong with putting some of it into meme stocks -- but only invest if it's money you can afford to lose. Meme stocks are extremely unpredictable, and the risk of losing money is high. Don't put your finances at risk in hopes of getting rich overnight.