It has been a wild year in the stock market, with a historic drop followed by an equally strong recovery. But uncertainty remains as the U.S. is still dealing with a pandemic, high unemployment, and a recession. Volatility will likely continue, which can be unsettling. But investors need to remember that investing is about the long term, so short-term fluctuations shouldn't knock them off course.

However, markets shift and economics change in volatile times, which can also knock companies and their stock prices off course. But if you are looking for stable, low-risk stocks that should be able to churn out solid returns even during the most volatile times, here are two good defensive choices: Walmart (WMT -0.08%) and CME Group (CME -0.75%).

A computer board with the words "Risk" and "Analysis" on it with different settings, from low to extreme. The low light is lit up on the board

Image source: Getty Images.

Walmart: A market leader with low volatility

Walmart (WMT -0.08%), the world's largest retailer, has been a remarkably consistent performer over the years. Over the past five years, the stock has posted an annualized return of better than 15%, and this year it has not been hurt by the pandemic, up about 15% through Thursday's close.

Walmart has been buoyed by its investment in its online sales operation, which has steadily gained market share and is now second behind Amazon, with about 5% of the online retail market. Revenue and earnings have steadily climbed over the past five years, and are expected to continue as online sales grow and the company ventures further into e-commerce with its planned Walmart+ membership service, which is designed to take on Amazon Prime.

Meanwhile, its free cash flow in the second quarter was about $10.1 billion, up more than $5 billion year over year, and operating income was up $7.8 billion to $19 billion. 

Plus, Walmart's beta, which is the measure of the volatility of a stock compared to the risk overall market, is a low 0.28. The market has a beta of 1.00. So the lower the beta, the less it deviates from the market. A beta over 1.00 means the stock swings more than the market. A beta of 0.28 means there are few stocks less volatile than Walmart.

As the market leader, and a discount retailer with a growing online presence and strong cash position, Walmart is poised to perform in all markets, with solid returns and little risk.

CME Group: A good defensive play

Like Walmart, CME Group (CME -0.75%) has an extremely low beta, at 0.31. CME Group, is the largest derivatives exchange in the U.S. -- it owns the Chicago Mercantile Exchange, the Commodity Exchange, the Chicago Board of Trade, and the New York Mercantile Exchange.

Market volatility has been good for CME, as it leads to lots of trading on CME's exchanges, which results in more transaction fees.  The company saw record trading volume in the first quarter, which has buoyed revenues this year. In addition, CME Group has a growing market and data services business, which saw revenue jump 5% in the quarter.

Overall, CME has managed expenses and increased its cash position to $1.5 billion in the second quarter, from $1 billion after Q1, and lowered its debt to $3.4 billion. It reduced expenses by $30 million to $544 million in the second quarter and expects to see an overall expense reduction for the year.

As one of only a few exchanges, and the leading derivatives exchange, it has a significant competitive moat with a high barrier to entry. That shows in CME's consistent annual revenue gains over the past decade. Unlike most financial stocks, CME Group is not tied to economic or market environments. As a leading exchange, as long as there are markets and trading, it will generate consistent revenue through both good and bad years. You can expect steady, long-term returns from this low-beta stock.