U.S. stocks posted small gains on Friday after a holiday-shortened week and a volatile month. The blue-chip Dow Jones Industrial…