New Zealand's sharemarket ended the financial year with a bang, riding a rising tide of optimism which lifted world markets in the wake of progress on Greece's bid to avoid a debt default.
The benchmark NZX-50 index rose nearly 1 percent, lifting 33.429 points to 3448.35.
The 0.979 percent rise was in contrast to Tuesday, when it ran out of puff, and Wednesday when it also started well, but went into a sharp decline.
The NZX-50 was up 17 points shortly after opening. It bumped along in a relatively narrow range as data from the National Bank's monthly business survey showed the nation's business confidence rose in June, but firms were slightly less optimistic about their own business later in the year even though inflationary expectations had eased.
Fewer than half the respondents - 46.5 percent - expected the economy to improve, from 38.3 percent in May, but the share of respondents who expected their own business to grow in the next 12 months slipped slightly to 38.7 percent from 39.7 percent.
Overall, the 36.4 million shares changed hands, valued at $115.6m.
Stocks with rising share prices heavily outnumbered falls, 53 to 20, among the 114 stocks traded. Fletcher Building - a major beneficiary of the Christchurch reconstruction - rose sharply in early trading, lifting 8c, and finished up 20c at the close, on $8.62.
Contact Energy was up 1c to $5.36, Mainfreight gained 10c to $10.15, The Warehouse was up 6c to $3.47, Trustpower lifted 2c to $7.23, Sky City lifted 6c to $3.62, and cornerstone stock Telecom rose 3c to $2.45.5c.
Australian shares rallied for a third consecutive day, and at the close, the benchmark ASX200 index was up 78.5 points, or 1.7 percent, at 4608, while the broader All Ordinaries index jumped 80 points, or 1.7 percent, to 4659.8.
Even so, the ASX200 lost 2.1 percent in the month and 4.75 percent for the quarter, its first quarterly retreat in a year. For the financial year as a whole, though, the index posted a gain of 7.1 percent.
In the United States, the end of trading marked the best three-day run in the past three months after the Greek parliament approved austerity measures to avoid defaulting on its debt.
Optimism about the plan's approval helped the stock market recoup some of its losses of the past two months.
"The whole scary month of June has been healed with these nice three days we've had," said Wayne Kaufman, chief market analyst at John Thomas Financial in New York. "That is a pretty good indication that you've got a floor under the market now."
The Dow Jones industrial average gained 0.6 percent to 12,261.42, the Standard & Poor's 500 Index rose 0.8 percent to 1307.41, and the Nasdaq Composite Index added 0.4 percent to 2740.49.