The turnaround suggested that pessimism sparked at least partly by the market sell-off around the start of the year may be lifting. The survey also showed that optimism about the broader economy improved.