This paper examines the optimal bank interest margin, the spread between the loan rate and the deposit rate, when the bank's preferences include the like of higher equity returns and the dislike of higher equity risks based on a path-dependent Cobb–Douglas utility function. A path dependency implies that the bank equity return can be knocked out whenever a legally binding barrier is breached. A Cobb–Douglas utility indicates substitutability between equity returns and equity risks for the explicit treatment of risk aversion. We show that an increase in the barrier results in a reduced loan amount held by the bank at an increased interest margin when the probability of hitting the barrier before the expiration date is high. The bank interest margin is negatively related to the degree of the like (Equity returns) preference relative to the dislike (equity risks) preference. Preference as such makes the bank more prone to risk-taking, thereby adversely affecting the stability of the banking system.