Market ends higher to log weekly gain

Net inflows of foreign capital also helped lift the market.