Jair Bolsonaro, presidential candidate for the Social Liberal Party (PSL), waves to supporters during a campaign rally in Taguatinga, Brazil, on Wednesday, Sept. 5, 2018.

Brazilian stocks surged on Tuesday after a poll showed Brazil's far-right presidential candidate Jair Bolsonaro gained ground in the latest electoral poll.

The iShares MSCI Brazil exchange-traded fund (EWZ) jumped 5.6 percent to post its best day since Jan. 24, when it gained 6.2 percent. Brazil's Bovespa index gained 3.8 percent, its its biggest one-day gain since Nov. 7, 2016, when it surged 4 percent.

A poll released Monday by Ibope showed Bolsonaro would tie Fernando Haddad, the left-wing candidate from Brazil's Workers Party, in a likely second-round runoff. Last week, Haddad led Bolsonaro 42 percent to 38 percent in a runoff scenario.

The election is widely expected to head to a runoff on Oct. 28 since none of the candidates running are forecast to win a majority vote in the first round scheduled for Sunday.

Bolsonaro is seen as a more market-friendly candidate than Haddad given his economic platform, said Alberto Ramos, head of Latin American economics at Goldman Sachs. Now "the fear is that Haddad and the Workers Party will return to power and to the policies that took so many years to digest," he said.

Haddad became the Workers Party candidate after a court banned former President Luiz Inacio Lula da Silva from running again. Da Silva, better known as Lula, is serving a 12-year sentence for corruption. Lula's government — along with that of Dilma Rousseff, his successor — led to a ballooning fiscal deficit and contributed to an unsustainable pension system.

In turn, Ramos said Bolsonaro's economic advisors "seem to have a better assessment of the seriousness of the fiscal challenges besetting the Brazilian economy," hence why the market is cheering his progress in the polls.

The big question remaining for Bolsonaro is whether he has enough political capital to move forward with the necessary economic policy changes that are needed, Ramos added.

Bolsonaro has been criticized for making homophobic and racist remarks. In 2011, he told Playboy he would rather have a dead son than a gay son. He also said in another interview that Haitian immigrants were bringing diseases to Brazil.

Prior to Tuesday's rally, EWZ was down nearly 17 percent for the year, while Bovespa had gained nearly 3 percent.