Sensex barely holds on to gains, HDFC Bank earnings in line

A broker trades on his computer terminal at a stock brokerage firm in Mumbai, India, January 20, 2016. REUTERS/Shailesh Andrade/Files

MUMBAI (Reuters) - India's stock markets ended largely flat on Monday as gains in stocks such as HDFC Bank were offset by volatility in crude oil prices and caution ahead of the derivatives contracts' expiry later in the week. The broader Nifty ended 0.18 percent higher while the benchmark Sensex was up 0.21 percent, with both indexes marking gains for a second straight session. (Reporting by Karen Rebelo in Mumbai; Editing by Anand Basu)