Stellar gains in Australia's benchmark stock index have taken traders by surprise this month and analysts say the market finally appears to be reacting to a weak Australian dollar.
The S&P/ASX 200 index ended July with a gain of about 5.5 percent, the biggest monthly gain since November 2012. It was one of the best performing stock markets in the Asia-Pacific region in July.
"When you have the material, energy and financial sectors gaining 10 percent, 6.8 percent and 6.3 percent respectively, and given the weights these sectors have on the broader market, you can see why the ASX is on fire," said Chris Weston, chief markets strategist at trading firm IG.
Analysts said the strong rally in Australian shares was partly explained by investors picking up cheapened stocks after a steep sell-off in May and June and a big decline in the Australian dollar.
(Read More: How low must the Aussie go before the RBA backs off?)
The market outperformed most of its regional peers in July, with Japan's Nikkei ending the month little changed and the Shanghai Composite up about 0.7 percent. The Hang Seng index, like the ASX 200, ended the month with gains of just over 5 percent.
"We were trying to sell [Australian] resource stocks because of the weaker outlook for China's economy and we thought we were right, but got caught short," said Ben Collet, head of Asian equities at Sunrise Brokers in Hong Kong.
"The macro environment has improved a bit for Australia, but we have been a bit confounded about why it [the ASX 200] has been hanging in there," he added.
(Read More: For Australia, 'R' Word May Not Mean Recession)
Aussie dollar boost
The Australian dollar, known as the Aussie for short, has fallen more than 9 percent in the past three months, hurt by expectations for further interest rate cuts and a rally in the U.S. dollar on expectations for an unwinding of U.S. monetary stimulus.
When the Aussie fell earlier this year, stocks didn't benefit, rather investors were spooked by the currency's declines and pulled money out of the stock market.
But those fears have since subsided and investors are now looking for Australia's central bank to ease rates further.
ASX's 3-month performance
"We are now left with falls in the Australian dollar driven not just by lower terms of trade, but a central bank having to offset tight fiscal policy (at a government level) and banks keen to promote negative real rates (i.e. adjusting the cash rate for inflation)," IG's Weston said. "The Aussie dollar should continue to trade lower and it seems this will now have positive ramifications on the local stock market."
Other analysts expected any further stock market gains to be limited.
(Read More: Aussie back to doing its job as 'shock absorber')
"The profit season coming up could be hard and there is on-going uncertainty about China, which is very important for Australia," said Shane Oliver, head of investment strategy and chief economist at AMP Capital in Sydney. "I don't think we'll have a repeat of the 5 percent plus monthly gains and we should end the year around the 5,250 mark."
The ASX 200 closed on Tuesday at 5,052 points, up almost 9 percent so far this year.
— By CNBC.com's Dhara Ranasinghe; follow her on Twitter @DharaCNBC