The markets ended the four-session truncated week with minor gains, but volatility remained high and trading stayed in a narrow range as investors assessed mixed global and domestic cues. The benchmark indices witnessed sharp swings throughout the week, showing there was no clear trend in the market.