The Sydney and Melbourne housing markets are continuing to "defy belief" but banks have warned that government measures designed to address affordability could actually drive up prices.

National Australia Bank chief economist Alan Oster said property prices were showing no signs of slowing, despite growing concerns about affordability two months out from the federal budget.

The analysis from NAB shows median dwelling prices have climbed up to nine times higher than gross household incomes in Sydney and seven times higher in Melbourne on the back of surging investor demand.

"The housing markets in Sydney and Melbourne continue to defy belief," said Mr Oster.