After tough start, markets rebound to close first half | Fortune