This paper discusses the nature of fixed and variable loan contracts and derives the conditions which determine the optimal quantity of each. The results indicate that the payoff functions are quite different and dependent upon the project financed. The appropriate conditions for the allocation of loan terms to a set of borrowers are then developed. Finally, the analysis derives the optimal portfolio frontier and risk-return trade-off for the banking firm. Here, it is demonstrated that the solution is unlikely to be at a point of zero interest rate risk.