This paper formulates a portfolio optimization in a friction market as a suitable stochastic control problem with hyperbolic absolute risk aversion utility functions under a specific functional form of the amount of wealth invested in the risky asset inspired by the Merton optimal dynamics. The state variable is the amount of wealth invested in the risky asset, while the control variable is the share rate. This formulation has two advantages. First, it provides a portfolio where the optimality is obtained by minimizing the probability of large changes in the portfolio composition with consequently low frictions, while allowing for an explicit solution to the optimal control problem. Second, with this formulation, it can be proven that this optimal solution is the optimal solution of the frictionless Merton problem for corrected price dynamics. The corrected dynamics shows that the market friction increases the risk premium by an additional term that is an elementary function of the risk associated with the market frictions, as well the price of the risk, which also depends on the risk aversion of the investor. In addition, the corrected dynamics supports the existence of a shadow price in friction markets as already shown in Kallsen and Muhle-Karbe (2010). Finally, an empirical analysis to assess the model performance is illustrated on five-minute data of four major traded stocks, three market indexes, and four exchange rates including the Bitcoin/USD rate.