The Bank of New Zealand has defied a slowing economy and demand for credit to post a record annual profit.