The domestic equity market kept its winning momentum going on Wednesday as it hit fresh lifetime high for a third straight day, even as overall mood on Dalal Street remained cautious ahead of the release of key macroeconomic data and Fed chair Janet Yellen’s testimony to the US Congress.BSE Sensex ended the day 57 points higher at 31,804.82 with Hindustan Unilever (up 2.04 per cent), ONGC (up 1.59 per cent), SBI (up 1.34 per cent) supporting the gains.The Sensex now trades at 18 times its forward 12-month earnings multiple, which is higher than most of Asian markets and above its five-year average of 16.5.Energy stocks such as Chennai Petroleum Corporation (up 9.16 per cent) and Hindustan Petroleum (up 5.07 per cent) hogged the limelight on reports of merger of HPCL and ONGC. BSE Energy closed the session at 3,593.58, up 1.24 per cent.However, the gains were capped as investors awaited the consumer price inflation data, which is expected to cool off to a record low of 1.70 per cent in June, easing further from May's 2.18 per cent, according to a Reuters poll.The Nifty50 gained 30 points to end the day at 9,816. Shares of ACC , Infratel, Ambuja Cement surged up to 3 per cent on the index.Biocon (up 13.68 per cent), Adani Enterprises (up 5.92 per cent), Hindustan Petroleum (up 5.07 per cent) made the BSE Midcap index surge 1.08 per cent to 15,084.34.BSE Small cap too gained 90 points to end at 15,897.01. Shares of Lypsa Gems Rico Auto , Sasken, TI, Tex Infra surged up to 20 per cent."Stock market traded on a subdued note as market participants awaited the release of a slew of domestic macroeconomic data," said Karthikraj Lakshmanan, Senior Fund Manager, Equities, BNP Paribas Mutual Fund.Among sectoral indices, BSE Oil & Gas outperformed in trade, up1.54 per cent. It was followed by BSE Telecom, up 1.12 per cent. IT (down 0.38 per cent) was the only sectoral that ended the day in red.Liquor stocks rallied up to 13 per cent after Supreme Court clarified that the ban on sale of alcohol within 500 metres of any state or national highway will not cover roads within city limits, if they were to lose the highway tag post denotification.Among specific stocks, shares of oil-to-telecom behemoth, RIL advanced as much as 2 per cent in early trade and hit fresh 52-week high of Rs 1,524.50 after the company's subsidiary Reliance Jio Infocomm increased the effective rates of its services in a new set of tariffs unveiled on Tuesday.The euphoria over initial public offerings (IPOs) and spectacular response to recent listings have put the primary market once again in the limelight. IPOs of four railway units may come up with draft prospectus by August, according to reports.In other news, FMCG firm Bajaj Corp reported 5.30 per cent year-on-year rise in net profit at Rs 54.97 crore against Rs 52.20 crore in the corresponding quarter last year.Global markets remained cautious ahead of Federal Reserve chief Janet Yellen's semi-annual congressional testimony later in the day.In Asian markets, China's bluechip CSI300 index shed 0.3 per cent, to 3,658.82 points, while the Shanghai Composite Index fell 0.2 per cent to 3,197.54 points, Reuters reported.