Many mortgage firms must borrow funds on a short-term basis in order to originate loans that are to be sold later in the secondary mortgage market or to investors. When the prime rate of interest is higher on short-term loans than on mortgage loans, the mortgage firm has an economic loss that is offset by charging a warehouse fee.