US stocks rise but end October lower for 3rd losing month in a row