With the continuous development of social economy, urban real estate has gradually become an important commodity for trading, and to some extent, it also affects the trend of the national economy. In view of these limitations and demand, this paper introduces ant group algorithm, by combining the influence of urban real estate changes on the national economic trend; according to the relevant national policy impact, we analyze the national economy changes and fluctuations, try to build a “four-quadrant” model analysis of real estate market impact analysis, and clear national policy on real estate. In order to obtain better economic policies, we promote the healthy and stable development of urban real estate. Simulation experiment proved that ant colony algorithm is effective and supports the change of urban real estate value and national economy.