  We consider an infinite horizon portfolio problem with borrowing constraints,
in which an agent receives labor income which adjusts to financial market
shocks in a path dependent way. This path-dependency is the novelty of the
model, and leads to an infinite dimensional stochastic optimal control problem.
We solve the problem completely, and find explicitly the optimal controls in
feedback form. This is possible because we are able to find an explicit
solution to the associated infinite dimensional Hamilton-Jacobi-Bellman (HJB)
equation, even if state constraints are present. To the best of our knowledge,
this is the first infinite dimensional generalization of Merton's optimal
portfolio problem for which explicit solutions can be found. The explicit
solution allows us to study the properties of optimal strategies and discuss
their financial implications.
