Hargreaves to leave company after a mixed year