US stocks rise as investors look to close out strong month of gains