The stock market had a tough week but a great month. Here's what happened