We develop a fundamentally different stochastic dynamic programming model of trading costs. Built on a strong theoretical foundation, our model provides insights to market participants by splitting the overall move of the security price during the duration of an order into the Market Impact (price move caused by their actions) and Market Timing (price move caused by everyone else) components. We derive formulations of this model under different laws of motion of the security prices, starting wit...