In the first essay, I test the predictions of the market timing theory of capital structure on a comprehensive sample of firms that issued debt and equity during the period January 1974-December 2001. I first categorize firms as likely and unlikely market timers based on their ability to time the market. As a proxy for firms' ability to time the market, I use the index of financing constraints developed in Kaplan and Zingales (KZ) (1997). Separately, I categorize firms as likely and unlikely market timers based on their opportunities to time the market. I argue that firms will have more opportunities to time the market when their stock market prices do not reflect fundamental information about them. I proxy for the firm's stock price informativeness with the R-squared statistic obtained from regressing a firm's stock returns prior to a debt or equity issuance against industry and market returns as in Morck et al. (2000). I classify firms with a low R-squared statistic as having informative stock prices that rarely diverge from fundamentals. Such firms are classified as unlikely market timers. Given these a priori classifications of firms, I test whether firm financing choices differ across likely and unlikely market timers as predicted by market timing theory. I find that the unlikely market timers behave either no differently than the likely market timers or opposite that predicted by the market timing theory. In short, the results do not support the market timing theory. In the second essay, I examine the role of capital market imperfections on the allocation of capital across firms. Market imperfections make external financing costly and discourage investment for financially constrained firms. Changes in the investment opportunity set may reduce the effects of market imperfections on the cost of external capital and stimulate investment for financially constrained firms. Consistent with this hypothesis, I find that the sensitivity of investment to stock prices is significantly higher for financially constrained firms. Further, I link the increased sensitivity of investment to stock prices to changes in the cost of external financing.