Pricing problems include, among others, those of determining prices to charge for some services or products taking into account the customers’ reaction to such prices, as they could modify their purchases to avoid costs. Here we consider a pricing problem in the financial industry, namely, between the broker and the investor, as the former fixes the transaction costs on assets that are purchased by the latter. We assume that the broker defines a pricing policy based on ordering its fees and, depending on their amount, the investor either fully or partially owes fees. As a result, the function describing the total transaction costs is the ordered median and, to maximize its profit, the broker must determine the optimal weights of that function. In the model formulation, the broker must take into account investor reaction, resulting in a bilevel optimization model. In this model, the first level is the broker’s optimal choice that is followed in the second level by the investor optimal choice. We show how to formulate and solve the bilevel problem assuming two different sets of possible prices: discrete and continuous. In the former case, the nonlinear formulation is reduced into a mixed-integer linear model, while in the latter case, the resulting model remains as a mixed-integer nonlinear model. The solution obtained allows us to suggest some managerial insights of pricing policies, as broker profits and investor reaction to prices can be predicted and described. We will see that there is a trade-off between broker profits and investor risk, as pricing policies favorable to the broker increases the financial risks of the investor. This suggests the broker must exercise caution when implementing these policies, if investor gains and losses are of concern to the broker.