The country is in a recession, unemployment is at its highest levels since the Great Depression, and it's an election year with a great deal of political uncertainty. I don't need to read you the headlines -- you live it every day. The stock market, in turn, has been highly volatile.

While many investors have taken advantage of lower prices, many are also looking to ground their portfolios with stable, low-risk stocks. It's a smart strategy to have a mix of growth and value stocks, aggressive as well as conservative. Here are three excellent low-risk stocks that you can count on to deliver through the ups and downs.

1. McCormick

McCormick (MKC 0.66%) makes spices and flavorings that you probably have in your kitchen right now. This stock has been the model of consistency through every type of market. The company hasn't posted a negative annual return since 2008, which means it has seen its stock price grow each year for the past 12 years. Not many companies can say that. Even this year, with the S&P 500 down about 4% and the food products industry down roughly 6%, McCormick keeps chugging along, up about 6%. On June 25, the company delivered more solid results for the second quarter of its fiscal 2020, posting an 8% increase in revenue year over year and a 27% gain in profits. The increases were due in part to people staying home and cooking more.

Two people cooking food on a stove

Image source: Getty Images.

But the fact is that McCormick performs in all markets, as its profit margins have consistently been in the 40% range for the past decade. Another sign of its consistency is its dividend, which has gone up 33 straight years to make it a Dividend Aristocrat. McCormick has a low beta of 0.36, meaning it is less prone to react to swings in the overall market. A beta of 1.0 means the stock moves with the market, while anything lower means it is less volatile and anything over means it is more volatile. McCormick is a stock that offers great stability in uncertain times.

2. Dollar General

Retail store chain Dollar General (DG -0.34%) has been a strong performer in 2020, up about 22% year to date. Same-store sales increased 21.7%, and earnings per share grew 73% in the first quarter, as the discount retailer stayed open as an essential business during the stay-at-home orders. But it's not a short-term blip. During the recession, and beyond, Dollar General should continue to thrive as more people look to reduce their expenses and buy the basics at discount prices that rival the big chains. The company opened almost 1,000 new stores last year. Dollar General's expansion strategy of opening stores in underserved areas has put a store within five miles of 75% of Americans, giving shoppers a local option besides the big-box stores.

Like McCormick, Dollar General has performed in all markets, with 10 straight years of positive returns since it went public in late 2009. But the consistency goes well beyond that, as the company has enjoyed 30 consecutive years of same-store sales growth -- a key metric that shows whether a retailer is growing through execution as well as expansion. And like McCormick, Dollar General has a low five-year beta of 0.53, which speaks to its stability.

3. Moody's

Few stocks have been as reliable over the past decade as Moody's (MCO 1.26%). The credit rating agency has posted an annualized return of 24% over the last 10 years through Dec. 31, 2019, and has performed well this year, too, up about 15% year to date.

Moody's is so strong in large part because it's one of only three big players in its industry, along with S&P Global and Fitch Ratings. The three firms control 95% of the market, with Moody's and S&P 500 the two leaders at about 40% market share each. This moat is well-protected, as the market will only support a handful of rating agencies and they're pretty heavily regulated. So don't expect to see Moody's facing any new competition any time soon.

Moody's also has an analytics business that's smaller than the credit agency arm but adds another revenue stream when debt issuance declines. In the first quarter, Moody's revenue jumped 13%, while earnings per share climbed 32% to $2.60 per share. Revenue for Moody's Investors Service -- the ratings business -- was up 19% in the quarter, while Moody's Analytics was up 5%.

Moody's makes about 60% of its revenue from the credit rating business, but it has grown its analytics side of the business over the last few years to diversify revenue for when debt issuance is low. In the past year or so, Moody's has made moves to bolster the analytics business through acquisitions. It bought Regulatory DataCorp, a company that provides data to help companies stay in compliance with regulations, and RiskFirst, a firm that provides risk analytics to asset managers and pension funds. This is a company that's built to last.