This paper analyzes capital structure's characteristics and presents its simplified mathematical model. Panel data analysis shows that the listed companies prefer equity financing rather than debt financing. Furthermore, we propose a capital structure optimization model with uncertain equity financing constraints. We formulate the capital structure optimization problem as a two-stage stochastic optimization problem and solve it. Finally, numerical examples show that our optimization approach can improve the statistics result of capital structure adjustment.