The Karachi Stock Exchange's benchmark 100-share index closed 2.59 per cent, or 542.86 points, higher at 21,501.72.
"The market was buoyed by reports today that the new government plans to sell USD 5 billion in treasury bills to pay off a chain of debt that has led to power crisis and is affecting the economy," Sohail Ahmed, a market analyst, said.
The new government is planning to pay off the debt within the first 100 days in power as it believes the economy will only be lifted and foreign investments will grow if the power shortage crisis is dealt with immediately, said experts.
The stock market rally came after two straight days of decline.
More From This Section
On the previous two trading days, the stock market saw profit-booking after a wave of massive buying saw investors betting big that the crisis-ridden economy would revert back to high growth under Sharif, set to become premier for an unprecedented third term.
The Pakistani rupee also remained stable on Tuesday ending in the market on 98.43/98.49 against the US dollar.
Sharif, himself an industrialist and co-owner of diversified multi-million dollar conglomerate Ittefaq group, has said that revival of economy would be among his top priorities. He is seen by many in Pakistan as someone who can fix the country's bleeding economy.
The number of companies listed on KSE has come down in the past few years, from more than 650 in 2009, as the country's economy has been struggling amid a turbulent political scene.
However, a clear mandate in the just-held historic polls is expected to revive the economic activities and therefore the stock markets as well.