Markets witnessed a roller-coaster ride on the weekly expiry day but finally ended with gains of nearly one percent.