Mortgages are one-sided contracts under which the borrower may terminate the contract at any time, while the lender must commit to honoring the terms of the contract throughout its life. There are two aspects to this feature of the contract that are modeled in this paper. The first is that the borrower may choose between buying a house or renting. Given these alternatives, a contract between a household and a lender makes home ownership feasible, and provides insurance to the household against fluctuating rental payments. The second is that once in a contract, the household may terminate the contract by refinancing the future mortgage, and thus enter into a new contract. This option will be exercised whenever a combination of house price appreciation and declines in the mortgage rate is sufficient to increase the ex ante expected lifetime utility from the new versus the old contract.