Bank of America CEO Brian Moynihan is not worried about a potential U.S. economic slowdown, saying the American consumer is still in a strong place and can keep the economy growing.

"The underlying consumer is doing well and making more money. More importantly, they're spending more money," Moynihan told CNBC's Becky Quick on Wednesday. Moynihan said the bank's consumer base has spent $2 trillion this year, a 5.9% increase from the same period last year. "The U.S. consumer continues to spend and that will keep the U.S. economy in good shape."

His comments on "Squawk Box" come amid increasing fears of a recession. This has led investors to lower their exposure to riskier assets such as stocks in favor of traditionally safer Treasurys, pushing yields lower and depressing bank stocks. Bank of America shares have dropped more than 12% this month.

Moynihan pointed out that recession fears are arising as the U.S.-China trade war drags on while the European economy slows.

The world's two biggest economies — China and the U.S. — have been engaged in a trade war since last year. Both countries have slapped tariffs on billions of dollars worth of their goods. In Europe, economic activity has slowed to the point where the European Central Bank has signaled more stimulus is coming.

However, Moynihan said the world is "getting used" to the U.S.-China trade conflict. "And most people believe that the China situation, which is very difficult, is going to take a long time to resolve fully."

The trade war along with slower economic activity overseas contributed to the Federal Reserve's decision to cut rates by 25 basis points last month. Traders also expect the Fed to cut rates again in September, according to the CME Group's FedWatch tool. President Donald Trump said Tuesday he was "thinking about" cutting payroll taxes. And on Wednesday, he turned up the pressure on the Fed by likening Chairman Jerome Powell as "a golfer who can't putt."

"The one thing the world can't afford right now is for the U.S. not to continue its growth cycle," Moynihan said. "It would be the exact wrong time for the U.S. to have a problem."