This paper develops and examines a partial equilibrium model to investigate the effects of macroeconomic condition and firm-level productivity shocks on the determination of optimal debt ratio. The model extends the contingent-claims models of the firmfs capital structure by incorporating both the industry demand and firm-level supply factors into the firmfs earnings and unlevered asset value. Our model predicts that the optimal debt ratio is negatively correlated to the macroeconomic conditions and the firm-level productivity. Furthermore, the theoretical implications are totally supported by the pooled feasible generalized least squares estimation with 311 Taiwanese listed manufacturing firmsf quarterly data over the period from 1994 to 2003. The differences between the high-tech electronics and other manufacturing firms are also investigated, and particularly the high-tech firms are not tied up with the macroeconomic conditions while the others are.