The Sensex and Nifty posted their biggest percentage gain in nearly three weeks, as investors felt the recent losses had been priced in, even as cautious sentiment persisted across the globe.

Optimistic buying by investors on hopes Parliament will approve the long-pending Goods and Services Tax Bill (GST) in the upcoming monsoon session also helped. In addition, the rupee boosted the domestic sentiment as it gained 20 paise to 67.07 during intra-day trade against the dollar.

Still, the sentiment remained broadly cautious ahead of the US Federal Reserve’s policy decision today and Brexit referendum next week.

The 30-share BSE index Sensex ended higher by 330.63 points or 1.25 per cent at 26,726.34 and the 50-share NSE index Nifty jumped points or 1.21 per cent at 8,206.60.

Among BSE sectoral indices, capital goods index gained the most by 2.26 per cent, power 1.99 per cent, PSU 1.63 per cent and banking 1.38 per cent.

Top five Sensex gainers were State Bank of India (+3.9%), NTPC (+3.88%), L&T (+3.38%), Bharti Airtel (+2.82%) and Maruti (+2.5%), while the major losers were Dr Reddy's (-0.51%), Axis Bank (-0.35%), Adani Ports (-0.22%), Sun Pharma (-0.14%) and M&M (-0.06%).

State Bank of India and some of its associate banks rose after media report, citing government sources, reported that the Cabinet might approve the merger of five associate banks with the country's biggest lender.

Jet Airways, InterGlobe Aviation and SpiceJ et rose as the Cabinet has cleared the civil aviation policy.

Fed policy outcome

The Fed is expected to keep interest rates unchanged, and investors await Chair Janet Yellen's news conference later in the day. The central bank will also issue its updated economic projections.

Meanwhile, Britain is due to hold a referendum next week on whether to exit the European Union.

Still, analysts said shares had now found some support after the broader NSE index fell 2 per cent in the previous four sessions.

Investors are also hopeful Parliament will approve a revamped goods and services tax that would supplant multiple federal and state levies. While support has increased among states, it is yet to achieve a breakthrough.

“At the end of four-five days, most of this weak news may have been priced in and the value-buying may have added strength to the recovery,” said Anand James, chief market analyst, Geojit BNP Paribas Financial Services.

Global markets

Global stocks were up as expectations of dovish words from the US Federal Reserve soothed investors on edge over whether Britain will vote to leave the European Union.

European shares rose early on Wednesday after a five-day losing streak caused by jitters about next week’s British referendum on European Union membership, with Zodiac Aerospace surging after posting higher sales.

The pan-European FTSEurofirst 300 index rose 0.9 per cent, as did the pan-European STOXX 600 index.

A report by SMC Global said: "Asian stocks declined for a fifth day as the prospect of the UK leaving the European Union added to worries before central bank meetings, while investors weighed the impact after China's domestic equities were denied entry into MSCI Inc.'s indexes. US stocks fell for a fourth session in a row on Tuesday, marking the S&P 500 and the Dow Jones Industrial Average's longest losing streak since the market's low in February. Business inventories in the US saw a slight uptick in the month of April, the Commerce Department revealed in a report released. The report said business inventories inched up by 0.1 per cent in April after rising by a downwardly revised 0.3 per cent in March. Economists had expected inventories to edge up by 0.2 per cent compared to the 0.4 per cent increase originally reported for the previous month."