This year has been one of the most challenging periods in market history. The S&P 500 endured the worst first-half performance in half a century, and the bond market experienced its largest first-half decline on record. Meanwhile, the second half has gotten off to a volatile start. 

However, while it's rough for investors these days, some stocks can provide a safe haven amid the market's turbulence. Three companies that have held up well this year are Brookfield Infrastructure (BIPC 0.32%) (BIP -0.47%)Consolidated Edison (ED 0.64%), and WM (WM 0.79%). Here's why they can give investors some shelter during the current market storm.

Benefiting from inflation

Shares of Brookfield Infrastructure are down only about 1% this year. Add in the global infrastructure giant's high-yielding dividend, and the total return is approaching 6%. That's significantly better than the nearly 22% negative total return of the S&P 500. 

Its highly stable business model is one big factor helping keep Brookfield's stock afloat. The company's utilities, midstream operations, transportation businesses, and data infrastructure platform generate steady cash flow because long-term contracts and government-regulated rate structures supply 90% of its earnings. Meanwhile, 70% of those earnings have no volume risk and feature inflation-indexed rates. With inflation running high, a large portion of Brookfield's earnings are rising this year.

Inflation is one of a trio of internal drivers that should organically grow the company's cash flow per share by a 6% to 9% annual rate, with it expecting high-end growth this year. In addition, Brookfield's capital recycling strategy of selling mature assets and reinvesting the proceeds into higher returning opportunities should provide an additional boost to its bottom line each year. Add in its top-notch balance sheet and well-supported dividend, and Brookfield provides investors with a resilient business that can continue growing steadily regardless of economic conditions.

Approaching royalty

Consolidated Edison's stock price has risen almost 9% this year. Meanwhile, its high-yielding dividend has pushed its total return toward 15%.

Consolidated Edison's operations generate very stable earnings backed by steady demand and government-regulated rate structures. That gives it the recurring cash flow to pay an attractive dividend.

The company has steadily increased that payout over the years. It notched its 48th straight year of increasing its dividend in early 2022. That earns it the distinction of a Dividend Aristocrat and has it only a couple of years from the even more elite group of Dividend Kings. That long history of growing its dividend shows the durability of its business model. The company expects to be able to continue growing its dividend in the future, powered by rising rates and the expansion of its utility operations. 

Steadily turning trash into cash flow

WM's share price is down about 1% this year, while dividend payments have helped push the total return into positive territory. A big driver of its stability amid the storm is the steady nature of its collections and recycling business. Residential and commercial customers still need their trash picked up even if the economy slows.

The stability of WM's business enables it to generate steady cash flow. It uses that money to pay a growing dividend, repurchase shares, and make strategic investments. The company announced a double-digit dividend increase late last year -- its 19th straight year of growing the payout -- and authorized a $1.5 billion share repurchase program. 

WM also continues to invest in expanding its operations. It plans to invest $875 million through 2025 to expand its renewable natural gas business. That investment will reduce its emissions and operating costs. The company also recently agreed to acquire a controlling stake in Avangard Innovative's U.S. business to expand its recycling capabilities. These investments should help grow the company's base of steady earnings in the future, positioning it to continue increasing its dividend. 

Stability amid the storm

The stock and bond markets have been under tremendous pressure this year, weighed down by concerns the economy might experience a recession. A downturn would slow earnings growth for many companies, which is why their stock prices have tumbled.

However, utility and utility-like businesses are less economically sensitive, enabling them to deliver steadily growing earnings regardless of market conditions. That's why shares of Brookfield Infrastructure, Consolidated Edison, and Waste Management have held up so well this year. It makes them great companies to own as shelters during the current storm.