Do investors care who wins Indonesia’s election?

Indonesia's tight presidential contest spurred fears its markets face a selloff, but some analysts say whoever wins will pursue the same policies to attract foreign investment.

"All the rhetoric during the political campaign is likely to be thrown out of the window the moment either [candidate] is elected president," Fauzi Ichsan, senior economist at Standard Chartered, told CNBC.

Read More Indonesia kicks off closely-fought general elections

"Indonesia runs both a current account deficit and a fiscal deficit," he added. "Whoever is president, he will have to face the reality that to finance these deficits, he will need foreign investment, whether foreign direct investment or portfolio investments."

A Balinese man checks his name on a polling station during the Indonesia presidential election on July 9, 2014 in Denpasar, Indonesia.
Agung Parameswara | Getty Images
A Balinese man checks his name on a polling station during the Indonesia presidential election on July 9, 2014 in Denpasar, Indonesia.

In addition, "any president will have to hike fuel prices in the first quarter of 2015," he said.

The contest became a dead-heat between one-time frontrunner Joko Widodo, the Jakarta governor with a corruption-free reputation who is seen as the more market-friendly candidate, and main rival Prabowo Subianto, an ex-general facing a U.S. visa ban for allegations of past human rights violations. Once trailing by as much as 30 points in the pre-election polls, as the election day approached, Prabowo managed to close the gap with an aggressive, nationalistic campaign.

Joko Widodo, also known as Jokowi, has claimed victory based on unofficial results, although Prabowo's camp said they are still confident of winning. In offshore trade, the rupiah strengthened to around 11,500 against the U.S. dollar from 11,620 at the close Tuesday after early, unofficial exit polls indicated Jokowi may have eked out a narrow win.

Whoever wins will face questions over how to cut the price tag on the government's fuel subsidies.

Read More Indonesia votes: 5 things you need to know

Indonesia is expected to spend around 285 trillion rupiah (around $25 billion) on oil subsidies this year, swallowing up more than 15 percent of its budget and spurring cuts to other spending. In 2013, subsidies cost around 240 trillion rupiah, despite the government cutting the level mid-year. By comparison, the government aimed to spend around 200 trillion rupiah on infrastructure that year.

Both candidates have said they will use the savings from cutting the fuel subsidy to finance infrastructure spending.

Other investors are also relatively sanguine about who wins the race.

Read More Indonesia has no room for economic nationalism: Fin Min

"For both of them, the election mandate is the same and that is to kick start this economy," Medha Samant, investment director at Fidelity Worldwide, told CNBC.

Economic growth in the country has slowed, with the central bank cutting its forecast for this year to 5.1-5.5 percent, the weakest since 2009, during the financial crisis. Contributing to the problem, Indonesia's central bank has hiked rates five times since the middle of last year to 7.50 percent to prop up a crumbling currency. It also said it will raise interest rates if fuel subsidies are increased to contain any inflation.

Samant is looking for three signals from the new president: how they will boost the economy, how they will promote further infrastructure and what they will do about fuel subsidies.

"If we see those signals, we think irrespective of who is coming in, it's ok," she said.

"What Indonesia needs is attracting more capital," Samant said. "Both these candidates are focused on that, whether it's foreign investment into the capital markets or getting FDI (foreign direct investment) [or] getting more multinational companies to come in and invest."

Of course, some expect neither candidate will help boost the country's prospects much.

"We expect reform progress to be slow no matter who is elected," said Agost Benard, a credit analyst at Standard & Poor's in a note. While he expects both candidates will be conservative on debt management and fiscal spending, "any boost to policy-making and growth prospects is likely to be insufficient to strengthen the sovereign credit rating."

Read More What businesses want from Indonesia: Lippo CEO

To be sure, analysts expect a knee-jerk selloff if Jokowi doesn't have a clear victory.

Around $10 billion in foreign funds has flowed into Indonesia's markets so far this year, partly on expectations of a Jokowi election victory. Since May, as Jokowi's lead in the poll slipped, the markets sold off. The Jakarta Composite shed around 3 percent from its mid-May peak through early July, while the rupiah shed as much as 5.6 percent of its value against the dollar, before recovering as fresh polls suggested Jokowi might win.

Andrew Freris, CEO of Ecognosis Advisory, expects a "substantial" selloff if Jokowi doesn't win. But he noted the market has already made a substantial recovery from the around 16 percent selloff in the Jakarta Composite in the second half of 2013 in the wake of the taper tantrum after the U.S. Federal Reserve first broached its plan to begin tapering its asset purchases.

"I'm not that concerned," Freris said, citing the Thailand stock market's recent rally despite the country facing a coup d'etat. "Markets don't care that much about politics as long as the underlying fundamentals appear to be ok."

—By CNBC.Com's Leslie Shaffer; Follow her on Twitter @LeslieShaffer1