Stock markets end marginally lower on foreign fund outflows

Hindustan Unilever, Trent, HCL Tech, Asian Paints, and Tata Steel were among the gainers