When Warren Buffett speaks or makes a move, investors sit up and take notice. That's because this top investor steering the wheel at Berkshire Hathaway has driven the holding company to market-beating returns over nearly 60 years. Berkshire Hathaway has delivered a compound annual gain of almost 20% compared to the S&P 500's 10% such gain during that time period. It's not surprising that investors call Buffett "the Oracle of Omaha," with Omaha referring to his hometown.

In recent times, Buffett, like all of us, has been investing amid a backdrop of enthusiasm. Though the S&P 500 slipped back in April on concerns about President Donald Trump's import tariffs, the index quickly rebounded and charged ahead, even reaching record levels in recent days. Investors have been piling into technology stocks, another move that signals optimism -- these players generally do well in a growth environment.

But Buffett, as usual, isn't investing like the masses. He doesn't follow trends, and often he makes moves that are quite different from those considered popular at a particular moment in time. This clearly has worked out for him, and likely for those who have followed some of his key decisions.

So, what's Warren Buffett doing now? In recent quarters, as the S&P 500 climbed, Buffett made this one stunning move. Does the billionaire know something Wall Street doesn't?

Warren Buffett is seen at an event.

Image source: Getty Images.

Buffett's investment strategy

First, let's talk a bit more about Buffett's general investment strategy. The billionaire, as mentioned, doesn't chase trends and avoids investing in companies or industries he doesn't know well. When investing he pays close attention to the price of a particular stock and aims to uncover quality companies that are currently undervalued by the rest of the market -- or at least trade for a reasonable price.

Finally, Buffett is known for holding on to stocks for the long term. He's joked in the past about the subject, saying his ideal holding period is "forever." Buffett truly follows through on this, as he's held one of his favorite stocks, Coca-Cola, since the late 1980s and hasn't expressed any interest in selling.

Now, let's consider the stunning move Buffett made in recent quarters, as the S&P 500 soared. The top investor has built up a record level of cash, reaching a peak of more than $347 billion in the first quarter of this year and finishing the second quarter a bit lower, at about $344 billion.

BRK.B Cash and Short Term Investments (Quarterly) Chart

BRK.B Cash and Short Term Investments (Quarterly) data by YCharts

Buffett has bought some stocks in recent times. For example, he picked up health insurance giant UnitedHealth Group for a bargain in the second quarter -- the stock had declined amid headwinds but could represent an interesting recovery story. But for almost a dozen consecutive quarters, Buffett has been a net seller of equities.

"Nothing looks compelling"

"Often, nothing looks compelling; very infrequently we find ourselves knee-deep in opportunities," Buffett wrote in his latest letter to shareholders.

And that's likely the reason Buffett's cash levels have climbed. So, does Warren Buffet know something that Wall Street doesn't? It may be that Buffett has chosen to focus more on the following: Valuations have jumped in recent months as stocks have exploded higher, particularly in the area of technology.

NVDA PE Ratio (Forward) Chart

NVDA PE Ratio (Forward) data by YCharts

Technology stocks may bring great returns over the long term, but as a value investor, Buffett isn't seeking to get on that train. Instead, he aims to grow his cash level as the market becomes pricey and scoop up under-the-radar opportunities that Wall Street may be missing. Though Buffett's choices might not soar overnight, they could help him score a win over the long term -- as they've done in the past.

Buffett's lesson for investors

What does this mean for you? If you're an aggressive investor, you still may find opportunities to buy growth stocks -- even some of today's surging tech players. After all, the AI market may reach into the trillions in a few years, according to analysts' estimates, and many of today's quality tech companies are on track to benefit.

Whether you're aggressive or cautious, it's still a great idea to, like Warren Buffett, look beyond current trends and Wall Street comments -- and consider undervalued players that might be tomorrow's winners. By carefully investing in some of today's hot stocks but also diversifying across Buffett-style stocks you could supercharge your portfolio over the long run.