If the wild ride in the U.S. stock market in recent months has you feeling queasy about investing, it's time to develop an iron stomach. Rather than steering clear of stocks, right now is as good a time as any to invest in the market — provided you are in it for the long haul.

To be clear, there's no guarantee the worst of the recent market volatility is over. But there are plenty of opportunities to invest if you are willing to take a more tactical approach.

Even in the wake of February's market correction, some sectors of the market still look very attractive for investment, according to Denise Chisholm, sector strategist at Fidelity Investments. Looking to the next 12 months, investors should favor stocks that are levered to the economy or economically sensitive, Chisholm says. Her latest analysis of the various sectors puts technology and consumer discretionary stocks on top.

To buy into these sectors or increase exposure, the easiest approach is to buy equal-weighted index mutual funds or ETFs that track these specific sectors. Alternatively, you can do the due diligence to identify particular stocks within particular sectors.

Technology stocks are likely to see strong earnings growth, while consumer stocks will benefit from tax cuts for consumers, said Randy Hare of Huntington Private Bank. Hare recommends service-oriented technology companies — like payment processors or those specializing in outsourcing services — and consumer-oriented travel and leisure companies such as cruise lines or hotels and some retailers, like dollar stores.

If you don't buy the notion that the U.S. economy is poised for further growth in the next 12 months, there's another approach: Get defensive.

Generally speaking, the defensive sectors are considered to be health care, telecommunication, utilities and consumer staples stocks. Among these, Chisholm said "health care pops to the top of the defensive bucket."

A final way to add diversification to your portfolio is by investing in smaller companies — or markets outside the U.S. Such strategies are beneficial for reducing your overall risk, regardless of the recent market turmoil.

Earlier in the year, Huntington Private Bank started increasing its weighting to U.S. small-cap stocks, Hare said. That's because these companies "are more domestically focused, they are a little less exposed to trade issues, and earnings growth is accelerating faster" relative to large-cap stocks, he added.

Anna-Louise Jackson is a writer at NerdWallet. E-mail: ajackson@nerdwallet.com. Twitter: @aljax7.