  We present a simulation-and-regression method for solving dynamic portfolio
allocation problems in the presence of general transaction costs, liquidity
costs and market impacts. This method extends the classical least squares Monte
Carlo algorithm to incorporate switching costs, corresponding to transaction
costs and transient liquidity costs, as well as multiple endogenous state
variables, namely the portfolio value and the asset prices subject to permanent
market impacts. To do so, we improve the accuracy of the control randomization
approach in the case of discrete controls, and propose a global iteration
procedure to further improve the allocation estimates. We validate our
numerical method by solving a realistic cash-and-stock portfolio with a
power-law liquidity model. We quantify the certainty equivalent losses
associated with ignoring liquidity effects, and illustrate how our dynamic
allocation protects the investor's capital under illiquid market conditions.
Lastly, we analyze, under different liquidity conditions, the sensitivities of
certainty equivalent returns and optimal allocations with respect to trading
volume, stock price volatility, initial investment amount, risk-aversion level
and investment horizon.
