The S&P BSE Sensex soared over 500 points – its biggest single day gain in the past seven months – on Friday, on receding fears over yuan devaluation and rising prospects of a rate cut by the Reserve Bank of India (RBI). 

The Sensex closed at 28,067, up 518 points from its previous close, while the 50-scrip Nifty gained 163 points to close at 8,519.

The rally was mainly driven by metal stocks, which were under heavy selling pressure earlier this week. 

The Chinese central bank said it saw "no reason" for the yuan to depreciate further, which calmed down fears of volatility in currency markets worldwide.  

While the Vedanta stock rose 3.73% to close at Rs 107.20 on the Bombay Stock Exchange (BSE), Hindalco gained 2.64% to end at Rs 93.30.

The rupee, which traded at two-year lows in the past three trading sessions, also stabilised following the Chinese central bank comment. 

Another major support for the markets came from the declining inflation rate in the country. Data showed that the wholesale price inflation (WPI) fell to a decade low of 4.06% in July, strengthening expectations for an interest rate cut by the RBI next month. 

"Looking ahead, the WPI rate should remain low by past standards. There is still evidence of spare capacity in the economy, which should keep a lid on core price pressures," said Capital Economics in a note.

Bank stocks rose sharply on the possibility of a rate cut. Punjab National Bank was the biggest gainer, with its share prices soaring over 8% on the BSE to end at Rs 166.25.

Stocks prices of ICICI Bank, HDFC Bank, SBI and Kotak Mahindra Bank rose in the range of 2-3%. 

Markets started pricing in a rate cut by the RBI in September, following a sharp decline in retail inflation, reported earlier on Wednesday.

Retail inflation (CPI) dropped to a nine-month low of 3.8% in July due to lower food prices and high base effect. The inflation rate stood at 5.4% in June.

"While the RBI has rightly reiterated that its policy action will remain data dependent, a 25bp repo rate cut in September is our baseline scenario," said Barclays Capital in a note.

The RBI governor Raghurajan Rajan had kept repo rate unchanged at 7.25% at the 4 August meeting. 

"Coupled with continuous negative prints in WPI, we think the recent drop in CPI inflation will assuage the inflationary concerns of the central bank," Barclays said.