Earnings results surpassed expectations for the third consecutive quarter, which drove the market's strong August performance.