The S&P 500 and Nasdaq Composite reached record highs on Monday while the Dow Jones Industrial Average lagged behind as August draws to a close.