The stock market has an insidious effect on C.E.O.s' moods, because of its impact not just on their companies but on their own bank accounts.