Warren Buffett's company, Berkshire Hathaway, (BRK.A 0.82%) (BRK.B 0.96%), recently held its annual shareholder meeting. And as usual, it provided investors with many words of wisdom and insights. It also offered a glimpse into what the billionaire investor is thinking about the markets right now.

Berkshire's cash balance has been growing over the past year, leading many investors to assume that Buffett may be hesitant and worried about where the market is headed. But is that really the case? Here's a look at what he said during Berkshire's shareholder meeting, and what it might mean for investors.

People crowding around a computer.

Image source: Getty Images.

Concerns about the economy are par for the course

Buffett isn't a fan of tariffs; after all, they can impede the economy's performance. He said that they "can be an act of war," which are strong words from the billionaire who has been invested in the market amid several wars. At Berkshire's shareholder conference, he did, however, downplay much of recent sell-off in the markets, saying that "What has happened in the last 30, 45 days ... is really nothing."

Buffett has seen much more volatility over the years. But the recent market activity wasn't inconsequential for investors; the Nasdaq Composite briefly entered bear market territory, while the S&P 500 wasn't far from it. It has been a turbulent start to the year for the market.

But his overarching theme wasn't surprising. He once again reiterated his belief in the U.S. economy over the long haul. "We've gone through great recessions, we've gone through world wars, we've gone through the development of an atomic bomb that we never dreamt of at the time I was born, so I would not get discouraged about the fact that it doesn't look like we've solved every problem that's come along."

Buffett's words remind investors of just how much uncertainty there can be in the markets, especially when looking at the long term. While tariffs may look terribly concerning today, in the grand scheme of things, they may not end up having a much larger effect on your portfolio over the years than other economic events. Staying the course, like Buffett, is what's important.

A Buffett-type fund to hang onto amid market volatility

Investing in the market at a time like this can seem risky, but one way to do so effectively is to hold a position in an exchange-traded fund (ETF) that tracks the S&P 500, such as the Vanguard S&P 500 ETF (VOO 0.44%).

Historically, the index has achieved annual returns of around 10%. There will be some volatility and fluctuating returns along the way, but generally, investing in an ETF that tracks the S&P is a good way to be invested in the market without having to worry about individual stocks.

Buffett has long been a fan of index investing, especially for people who may not be comfortable with taking on much risk or who are uncomfortable picking individual stocks. Over the past decade, the Vanguard fund's total returns (which include dividends) have closely matched those of the S&P 500.

The ETF can be an ideal option since it charges a low expense ratio of just 0.03%. And with gains of more than 230%, a $15,000 investment in the ETF 10 years ago would be worth around $50,000 today.

^SPX Chart

^SPX data by YCharts.

Investors should remain invested

Tariffs add risk and uncertainty to the market, but they aren't a reason to get out of stocks. Government policy can change without notice, as investors saw with the recent pause on most tariffs between the U.S. and China. It's virtually impossible to predict what the government may do, which is why you're better off not trying to do so.

By investing in quality stocks and hanging on for the long term, you can still be on track to earn great returns. Great companies, after all, will adapt to changing market conditions. And if you're not sure of which stocks to invest in, simply tracking the S&P 500 by holding an ETF such as the Vanguard S&P fund can be an easy option.

But trying to get in and out of the market and trying to time it can be a risky strategy, one that leaves you potentially missing out on big gains along the way. Staying invested in the market, as Buffett has for decades, is likely going to be the best move to make over the long term.