I was attempting a flight from Luanda to Lagos in an Arik Air CRJ-1000, but during my climb the autopilot couldn’t get the vertical speed correct. Right after I engaged vertical speed, the plane shot up and began to maintain +5000 fpm. Then, it shot me down to around +500 fpm, and then it went back up again. During all of this I lost around 20 kts, but I quickly disengaged the autopilot and then stalled. Then I leveled the plane off and tried to see if I could get the vertical speed autopilot to work. I set it for +0 fpm, but the plane kept on pitching up and down. Then I just disengaged it and headed back to Luanda. Is there anything I can do to fix this problem?