Let's say you want to maximise your expected utility. You know the probability density function of the closing price, p(x). Let's also suppose you know your own utility function, U(y). Let's say last night's closing price was x', and you currently hold Z in assets.
Then if yesterday you were all in cash, your expected utility is U(Z) if you stay in cash, and integral x=-infinity to x=infinity of U((Z-2) (x / x') p(x)) dx if you switch to stocks. If yesterday you were all in stocks, your expected utility is U(Z-2) if you switch to cash, and integral x=-infinity to x=infinity of U(Z (x / x') p(x))dx if you stay in stocks.
So choose the larger utility.
Or, to make it much simpler, let's say you're trying to maximise your expected return the next day. If you're in cash, and integral (Z -2) (x/x') p(x)dx > Z, switch to shares, otherwise stay in cash. If you're in shares, and integral Z * (x/x') p(x)dx < Z -2, switch to cash, otherwise stay in stocks.
Reasonable but still missing a piece. Even after determining your wealth, your utility function has to take whether-you-are-currently-holding-stocks as an input, because it affects the probability that you incur a transaction cost in future time steps. I think this piece cannot be evaluated without supposing some pdf of future pdfs. I think this is why people are saying the problem is "underspecified".
Let's suppose you start with $1000 to invest, and the only thing you can invest it in is stock ABC. You are only permitted to occupy two states:
* All assets in cash
* All assets in stock ABC
You incur a $2 transaction fee every time you buy or sell.
Kind of annoying limitations to operate under. But you have a powerful advantage as well. You have a perfect crystal ball that each day gives you the [probability density function](http://en.wikipedia.org/wiki/Probability_density_function) of ABC's closing price for the following day (but no further ahead in time).
What would be an optimal decision rule for when to buy and sell?