# Expected value problem, investment in the stock market

Suppose you have \$10,000 and want to invest in the stock market. You initially buy 500 shares of DGCo (Don't Gamble Inc), at \$10 each. Assume that you trade every day, even on Sundays, and you buy 10 shares of DGCo every time that it goes up by \$1 in price, and sell 10 shares every time it goes down by \$1 in price. Assume that the price of the stock is a random variable and that it is equally likely that at any time it will go up by \$1 or down by$1.

Compute the expected amount of money that you will have after trading for a year this way.

I'm familiar with the expected value definition, but I think this one is difficult because I think all days must be correlated, the amount of money you have on day t depends on what happens on all previous days. But maybe I'm overthinking it, please help.

I hope you can help me with this problem, I'm very confused.

At time $t$, let $M_t$ denote the pile of money you have to buy and sell the stocks, $N_t$ the number of stocks in your possion and $X_t$ is the price of the stock. Your fortune at time $t$ is then $F_t=M_t + N_t X_t$.
Stock goes up: $X_{t+1}=X_t+1$, $N_{t+1}=N_t+10$, $M_{t+1}=M_t - 10X_{t+1}=M_t+(N_t-N_{t+1})X_{t+1}$. So: $F_{t+1}=M_{t+1}+N_{t+1}X_{t+1}= M_t+N_t X_{t+1}= F_t + N_t(X_{t+1}-X_t)$
Stock goes down: $X_{t+1}=X_t-1$, $N_{t+1}=N_t-10$, $M_{t+1}=M_t + 10X_{t+1}=M_t+(N_t-N_{t+1})X_{t+1}$. Again we have: $F_{t+1}=M_{t+1}+N_{t+1}X_{t+1}= M_t+N_t X_{t+1}= F_t + N_t(X_{t+1}-X_t)$
Thus the (conditional) expected change is $$E(F_{t+1}-F_t|X_t) = N_t E(X_{t+1}-X_t|X_t) = 0$$ Averaging over all, we get $$E(F_{t-1}-F_t)=0$$ so the 'game' breaks even on average (neglegting the possible exceptions when $X_t$ or $M_t$ becomes zero).
The expected value of your portfolio will be $10,000. On any given day the expected value of your portfolio on the next day is the same as the value of the portfolio on that day.$E[X_{t+1}] = X_t.$That is, the shares have equal probability of rising in value as they do in falling in value (and rising and falling equal magnitude). Trading behavior does not influence the Expected value in this scenario. However the distribution will be skewed. There will be a large probability of losing money, with a small probability of making a lot of money. One way, somewhat incomplete, to think about the problem is to think about state in which you have money$m$, hold number of stocks$s$and the price is$p$. Call this state$(m,s,p)$. Initial state is$(5000,500,10)$. If the price goes up, you end up in state$(m-10(p+1),s+10,p+1)$. If the price goes down, you end up in state$(m+10(p-1),s-10,p-1)$. Hence on average you transit from having$m$to having$m-10$. The reason this thinking is incomplete is that you can only buy if$m\geq0$and can only sell if$s\geq0$. And your question does not specify what happens when$p\leq0$. Some numerical simulations I ran suggest that the non-negativity constraints are unimportant when you start with a lot of money, a lot of stock, high enough price and you trade for short period. If those conditions fail, the non-negativity constraints will protect$m\$ from decreasing so much.