Playing the role of cheerleader for the U.S. economy mangled by COVID-19, legendary investor Warren Buffett told fellow investors what they wanted to hear -- better days are on the horizon but they'd better stay in stocks to make money off the rebound.

"This country, in 231 years, has exceeded anybody's dreams," said Buffett at Berkshire Hathaway's annual shareholder meeting held at an almost empty CHI Health Center in Omaha, Nebraska.

Despite many companies reporting record losses in the first quarter, Buffett is convinced that better days lie ahead for investors. But, in the same breath, he urged investors to remain cautious.

"You can bet on America but you're going to have to be careful about how you bet. Markets can do anything," he said.

He also urged investors to stay in stocks over the long-term since they're still better bets than bonds.

"America's tailwind is not exhausted," Buffett asserted.

Buffett pledge to not abandon investing comes as Berkshire Hathaway announced it had lost more than $50 billion due to the pandemic in soured investments. The most stunning part of his statements was his announcement Berkshire Hathaway sold the entirety of its position in the U.S. airline industry worth more than $4 billion.

Buffett had decided airlines were worth a shot only in 2016. He quickly soured on an industry he'd avoided for most of his sterling a career as an investor. He famously quipped in 2007 that "if a farsighted the capitalist had been present at Kitty Hawk, he would have done his successors a huge favor by shooting Orville down."

Berkshire held stakes in American Airlines, Inc. (the world's largest airline), United Airlines, Inc., Southwest Airlines Co. and Delta Air Lines, Inc. It owned 10% in American and Southwest each, 9% in United, and 11% in Delta. These stocks have plummeted from 46% and 70% so far this year. All four U.S. carriers in April reported its first quarterly losses in several years.

"The airline business -- and I may be wrong and I hope I'm wrong -- but I think it's changed in a very major way," said Buffett. "The future is much less clear to me... I hope it corrects itself in a reasonably prompt way... I don't know if Americans have now changed their habits or will change their habits because of the extended [lockdown] period."

Berkshire said its huge Q1 losses were mainly due to the significant plunge in the value of its big investments, such as Kraft Heinz, Bank of America, Apple, and Coca-Cola. At the end of Q1, Berkshire had $137.3 billion in cash on its balance sheet.