NZX said it had first been hit by a distributed denial of service (DDoS) attack from abroad, on Tuesday. The exchange said the attack had "impacted NZX network connectivity" and it had decided to halt trading in cash markets just before 16:00 local time.
Trading halted briefly for a second time, on Wednesday, but was back up and running before the end of the day.
A second attack had halted trading for a large chunk of the working day - from 11:24 to 15:00 local time, the exchange said.
But despite the interruption, the exchange was up at the close of business, near its all-time high.
New Zealand cyber-security organisation CertNZ issued an alert in November that emails were being sent to financial firms threatening DDoS attacks unless a ransom was paid.
The emails claimed to be from well known Russian hacking group Fancy Bear which has been linked to the Russian government.
But CertNZ said at the time the threat had never been carried out, beyond a 30 minute attack as a scare tactic.