Hong Kong has recorded annual deficits exceeding $20 billion in three of the past four years, according to official figures.