Computing the optimal portfolio policy of an investor facing capital gains tax is a challenging problem: because the tax to be paid depends on the price at which the security was purchased (the tax basis), the optimal policy is path dependent and the size of the problem grows exponentially with the number of time periods. A popular approach to address this problem is to approximate the exact tax basis by the weighted average purchase price. Our contribution is threefold. First, we show that the structure of the problem has several attractive features that can be exploited to determine the optimal portfolio policy using the exact tax basis via nonlinear programming. Second, we characterize the optimal portfolio policy in the presence of capital-gains tax when using the exact tax basis. Third, we show that the certainty equivalent loss from using the average tax basis instead of the exact basis is very small: it is typically less than 1% for problems with up to ten periods, and this result is robust to the choice of parameter values and to the presence of transaction costs, dividends, intermediate consumption, labor income, tax reset provision at death, and wash-sale constraints.
London Business School working paper 2003