The last few years in the market have been a roller coaster. From a global pandemic to massive fiscal stimulus to inflationary pressures, investors have had a lot to deal with.

One good way to get a feel for where the economy is is to listen to experts across industries. In an interview with CNBC this week, Bank of America (BAC 1.17%) CEO Brian Moynihan discussed what he's seeing through the lens of one of the biggest banks in America. Here's what he had to say about the consumer's strength and the inflationary pressures in the economy.

A person pays for their bill at a restaurant.

Image source: Getty Images.

Consumer bank balances are healthy

As CEO of Bank of America, Moynihan is in a position where he can get a feel for where the consumer is when it comes to their banking activity. Moynihan noted that consumers' bank account balances continue to be stable -- growing from last year for the broad base of customers.

A chart shows consumer deposit growth with Bank of America.

Image source: Bank of America. YOY = year over year.

Bank of America noted that consumer account balances were up 14% on average during its first quarter. He went on to say that people still haven't spent their stimulus money and that balances did dip slightly in April, but that was expected with tax payments coming due. Overall, Moynihan sees healthy account balances at pre-pandemic levels across Bank of America's 35 million checking accounts.

Spending in this sector is up

In addition to healthy account balances, Moynihan noted that spending levels in May were up 10% from last year. Broken down further, spending at restaurants was up, and travel-related spending increased 40%.

A group of friends on a road trip in a blue convertible.

Image source: Getty Images.

However, retail goods spending was flat from last year. A moderation of retail spending is one of the contributing factors to why Walmart and Target cut guidance on earnings. The retailers have seen a buildup in inventories, a potential sign of slowing consumer spending on goods.

Here's what could keep inflation elevated

One other topic Moynihan touched on was the tight labor market. He noted that there were "two job openings for every job" and that the unemployment rate is projected to be very tight from a historical context. The unemployment rate for April was 3.6% -- right near pre-pandemic levels, which were already historically low.

The low unemployment rate is a positive sign and, coupled with the high number of job openings, makes it an employee's market. As a result, Moynihan is concerned we could see wage inflation as employers compete for a smaller pool of workers. So, while the Bank of America CEO is optimistic good inflation will come, he's concerned wage inflation could be a tougher nut to crack.

Investor takeaway

As investors, there are a few takeaways from Moynihan's remarks. For one, it looks like people are eager to get out and vacation two years after the pandemic first emerged. Second, retail spending could continue to slow down. Combined with high inventory levels, the retail sector could see pressure on its profits in the short term. This slowdown in demand could put a damper on inflation in retail goods in the next few months.

Lastly, you'll want to keep an eye on wage inflation. Some economists have expressed concern about the wage-price spiral. This situation occurs when wages rise to keep up with inflation, which causes companies to raise their prices due to the higher cost of labor. Once this cycle starts, it can be hard to stop and could cause inflation to stick around for even longer than expected.

One thing you can do during inflationary periods is invest in good companies with strong balance sheets. Dividend stocks can be a solid choice, too, as they have historically accounted for a larger share of the market's returns during inflationary periods.