Over the past two weeks, investors have been reminded that the stock market can go up and down. While a number of folks on Wall Street and Main Street had been looking for a pullback in equities after a more than 30% run higher, including dividend payouts, in the benchmark S&P 500 since 2019 began, essentially no one expected the reason for our recent decline would be fears surrounding a virus.

Since mid-January, a novel form of coronavirus -- a type of virus that typically infects mammals and birds but has been shown to cause respiratory distress in humans -- that originated in Wuhan, within China's Hubei province, has proliferated at an alarming rate. With many aspects still unknown, including the incubation period, some 16,514 cases were confirmed as of midday Sunday, Feb. 2, with 360 deaths attributed to this novel coronavirus, per the World Health Organization. 

Two surgeons examining a patient's chest x-ray.

Image source: Getty Images.

As you can imagine, fears of this spreading illness have shaken global markets. We've seen business activity slowed or shuttered in various parts of China, the world's second largest economy, with a number of major U.S. airlines among the latest to halt flights into the country. With the Wuhan coronavirus infecting far more people than Severe Acute Respiratory Syndrome (SARS) -- thankfully, leading to a lower mortality rate -- there's the possibility that we're bordering on a pandemic that could genuinely disrupt global growth for the foreseeable future.

Furthermore, fear over a spreading illness has hit the stock market before. In no particular order, Middle East Respiratory Syndrome (MERS), the avian flu, Ebola, and SARS all wound up knocking between 6% and 12% (when rounded) off the S&P 500 over a period of a few weeks to a few months. This might have some investors thinking about playing a game of duck-and-cover on the sidelines. However, history tell us this would be a mistake.

Here you'll find three ways you can continue to put your money to work in the stock market, even with coronavirus fears spiking.

An electric utility panel containing multiple rows of meters.

Image source: Getty Images.

Stick to basic-need goods and services

To begin with, consider investing into businesses that provide a basic-need good or service. Basic-need companies typically have solid pricing power in any economic environment, and their cash flow is usually highly predictable, given the consistent demand for their products. In other words, whether everything is peachy or the coronavirus is spreading rapidly, consumers are still going to buy detergent, toothpaste, toilet paper, and other basic-need goods and services.

One idea here would be electric and gas utility provider NextEra Energy (NYSE:NEE). Consumers rarely have a lot of choice when it comes to the company that provides their electric services, and a company like NextEra often sees little fluctuation in demand for electricity, save for modest changes based on weather. The proliferation of the coronavirus isn't going to have one iota of impact of NextEra's ability to be profitable. Plus, with NextEra's large investments in renewable energy, its electricity production costs should actually come in lower than many of its peers.

Another well-known basic-needs company is healthcare conglomerate Johnson & Johnson (NYSE:JNJ). We don't get the luxury of choosing when we get sick or what ailments we develop, which means Johnson & Johnson will always have a steady stream of demand for its medical devices and high-margin pharmaceutical products. Not to mention, Johnson & Johnson is also one of just two publicly traded companies with a higher credit rating (AAA) than the U.S. government (AA), and is riding a streak of having grown its adjusted operational earnings for 36 consecutive years.

A man placing crisp one hundred dollar bills into two outstretched hands.

Image source: Getty Images.

Buy dividend stocks

Next up, consider buying into companies that pay a dividend and consistently grow their payout over time. You see, companies that provide their shareholders with a dividend have consistently outperformed their non-dividend-paying counterparts by a lot over the long run. Dividend stocks are also almost always profitable and have time-tested business models, making them perfect to handle what'll likely be short-to-intermediate-term investor fears associated with the coronavirus.

For instance, telecom and content provider AT&T (NYSE:T) is among a select group of elite dividend payers within the S&P 500 known as Dividend Aristocrats. These are companies that have increased their annual payout for at least 25 years in a row. In AT&T's case, it raised its payout in December for the 36th consecutive year and is currently sporting a market-trouncing 5.6% yield. Because much of AT&T's business is reliant on high-margin wireless data and subscriptions, it's unlikely to see much in the way of surprises come earnings time -- and that's just the way Wall Street likes it. 

Keep in mind that dividend stocks don't always have to be high-yielding like AT&T to make you bank. Payment processing giant Visa (NYSE:V), for example, is dishing out only a 0.6% yield but has raised its quarterly payout on 12 separate occasions since 2008. No matter what's been thrown Visa's way, this company has seemingly grown the amount of purchase volume on its merchant network every year. Visa is also the dominant force in the U.S., with network purchase volume market share exceeding 50%, and has a long-run opportunity to grow its processing business in underbanked regions of the world.

Three golden eggs placed into a basket that layered with one dollar bills.

Image source: Getty Images.

Consider putting your money into targeted ETFs

Finally, investors spooked by the proliferation of the coronavirus can consider putting their money to work in exchange-traded funds (ETFs). Although most brokerages allow for commission-free trades, thus removing a huge barrier to diversification without having a lot of cash on hand, buying ETFs still allows for a quick way to target specific sectors, industries, market caps, or trends, with the click of a button.

As an example, we've seen a pretty sizable increase in the price of gold, with Kitco reporting a $266-per-ounce rise over the trailing year. Physical metals like gold, which benefit when fear manifests, are typically not the best investments given that they provide no yield. However, the mining companies that produce gold are able to adjust their production and costs, as well as pay a dividend to their shareholders. That makes the VanEck Vectors Gold Miners ETF (NYSEMKT:GDX) one you might consider.

The VanEck Gold Miners ETF currently has a yield of 0.65% and a net expenses ratio of 0.53%. In other words, your annual management expenses are completely covered by the payouts of the companies held by this ETF. What's more, because businesses have the ability to respond to economic conditions, unlike a physical metal, the VanEck Vectors Gold Miners ETF has outperformed the return of physical gold.

Long story short, there are a lot of ways to invest wisely as coronavirus fears grow.