Three months after Denmark became the target of a speculative attack against its currency regime, the International Monetary Fund says the country’s central bank has gained credibility after forcefully fighting back the onslaught. Policy makers “did a good job of making it clear that the peg would stand and making it clear that it would be unprofitable to speculate against it,” Thomas Dorsey, the IMF’s mission chief to Denmark, said in an interview. “Having for a generation-plus maintained the peg against pressure in both directions, they gain credibility each time and they did it again this time around.”

It’s a rare example of monetary authorities prevailing against the market. Conjecture that Denmark’s euro peg might break spread after Switzerland abandoned its ties to the single currency on Jan. 15. In the ensuing weeks, Denmark cut its main deposit rate to minus 0.75 percent and raised currency reserves by $40 billion to about 40 percent of gross domestic product to deter investors from hoarding kroner.

“It’s impressive how quickly the pressure abated,” Dorsey said. “It seemed to turn off like a light switch, just like it turned on.” Denmark’s currency regime can also withstand structural pressures coming from the country’s bulging current account surplus and a pension industry with a growing need to cover its liabilities, according to the IMF.