We develop a model of hedge fund returns, which reflect the contractual relationships between a hedge fund, its investors and its prime brokers. These relationships are modelled as short option positions held by the hedge fund, wherein the 'funding option' reflects the short option position with prime brokers and the 'redemption option' reflects the short option position with the investors. Given an alpha producing human capital, the hedge fund’s ability to deploy leverage to magnify its alpha is shown to be sharply constrained by the presence of these short options, which have a high probability of being exercised in “bad states” of the world, either due to poor performance or due to macroeconomic developments that are performance-independent. We show that the hedge funds typically have an optimal level of leverage that trades off rationally the ability to increase alpha with the risk of early exercise of short options, which may precipitate the liquidation of the fund. Optimal leverage is shown to differ across hedge funds reflecting their de-levering costs, Sharpe ratios, correlation of assets, secondary market liquidity of their assets, and the volatility of the assets. Using a minimum level of unencumbered cash level as a risk limit, we show how a hedge fund can optimally choose aggregate risk capital and then allocate its risk capital across different risk-taking units to maximize alpha in the presence of these short option positions. Implications of our analysis for hedge fund investors and policy makers are summarized. Our framework can be easily modified to study portfolio selection problem facing any fund, which has granted redemption rights to its investors (money market funds, long-only funds, etc).