Warren Buffett has remained invested in the stock market for decades, even amid wars and geopolitical uncertainty.