Legendary investor Warren Buffett's famous advice for investors is to be "fearful when others are greedy and greedy when others are fearful."

Buffett has seemingly walked the walk as well, with his company Berkshire Hathaway (BRK.A 1.38%) (BRK.B 1.44%) having purchased more than $57 billion of equities through the first six months of the year.

Even though the market fell earlier this year, the S&P 500 has traded at an even lower level in recent months, dropping about 9.3% in September, and with many stocks hitting new lows. Intense interest rate hikes and fears of a more severe recession have spooked investors.

In a little more than a month, Berkshire will submit its 13F regulatory filing for the public to see what stocks the company bought and sold in the third quarter of the year, which includes the months of July, August, and September. Did Buffett and Berkshire go bargain hunting during the market meltdown? Let's take a look.

What we know

We already know that Berkshire did some buying in the third quarter of the year because the company disclosed in a regulatory filing recently that it bought nearly six million shares of the large oil producer Occidental Petroleum.

Regulatory filings show that Berkshire spent more than $352 million on shares during the days of Sept. 26 to Sept. 28. Berkshire has been buying Occidental all year and owned about 20% of the company at the end of the second quarter. That ownership percentage is likely much higher now and Berkshire has permission to buy as much as half of all outstanding shares of Occidental.

But Occidental is certainly an outcast in today's market. The stock is up an absurd 118% this year, while the S&P 500 is in bear-market territory. The price of oil has risen significantly this year due to Russia's ongoing invasion of Ukraine, as well as the accompanying sanctions on Russian oil, which has made large U.S. oil and gas producers very valuable.

I don't think Berkshire's purchase of Occidental necessarily means it is buying other stocks as aggressively considering the unique position large oil producers are in right now. There are also rumors that Berkshire is contemplating an outright acquisition of Occidental Petroleum.

That said, many of Berkshire's stock purchases earlier this year are now trading at lower levels than when the conglomerate purchased them.

AAPL Chart

AAPL data by YCharts.

Celanese Corp, General Motors, Ally Financial, and Paramount Global are among the hardest-hit Buffett stocks this year. However, Buffett did trim his position on General Motors in the second quarter of the year. 

Has anything changed?

A lot has changed since the beginning of the year. For one, nobody expected the Federals Reserve's benchmark interest rate to be as high as it is right now, and it could end the year another 1.4% higher at 4.4%, according to the Fed's median forecast.

Furthermore, the possibility of the Fed engineering a soft landing for the economy is now much less likely. Many investors believe a much more severe recession in 2023 is now inevitable. Given all of these macro headwinds, Buffett and Berkshire might be less interested in deploying capital -- much of their buying this year came in the first quarter.

But remember, Buffett is a long-term and value investor, which means he likes to find stocks trading below their intrinsic value, and there is a lot of opportunity to do this in today's market. Buffett has also been known to make moves in tough economic times and typically buys stocks with a long-term outlook -- he has said previously he looks to purchase stocks he'll never have to sell. 

Interestingly, while Buffett bought stocks in the second quarter, he didn't buy any new stocks but simply added to existing positions.

My guess is we could see similar moves in the third quarter, because while the outlook has become less favorable, I'm sure Buffett and Berkshire still have faith in the stocks they made long-term bets on during the first quarter of the year. If the thesis is still intact, why not continue buying at more favorable levels?