In the stock market you do not base your decisions on what the market is doing, but on what you think is rational.
Source, in full
Quoted in The Warren Buffett Portfolio: Mastering the Power of the Focus Investment Strategy (2000), p. 112, and Think, Act, and Invest Like Warren Buffett: The Winning Strategy to Help You Achieve Your Financial and Life Goals (2012), p. 22