Find optimal policy to maximize given stochastic process. Let $x$ be a real-valued random variable with finite and constant expected value $\mathbb{E}[x] = \mu$ and $Var[x_t]=\sigma^2$. We observe outcomes of this random variable in discrete time $(x_t)_{t=1}^{T}$ where $T = 1,2,3,...$ are consecutive points in time.
Let's suppose that we have a real-valued control $u_t$ over the following two stochastic processes:
$$z_T = z_0 + \sum_{1\le t\le T}u_t x_t$$
$$y_T = y_0 - \sum_{1\le t\le T}u_t.$$
Here $T = 1,2,3,...$ and $z_0>0$, $y_0>0$.
I consider a specific moment in the future i.e. $T$ is constant.

Find formula for $u_t$ in order to maximize $\mathbb{E}[z_T]$, with restriction $y_t>\frac{y_0}{2}$ for all $t\le T$.

Do we need distribution of $x$, to have a more optimal policy of choosing $u_T$?
Any help or hint will be appreciated.
EDIT
Here i am also interested on how does the policy $u$ changes as we take $T$ to the infinity.
 A: So, in the present case, we have that
$$\mathbb{E}[z_t|z_0]=z_0+\mu\sum_{i=1}^tu_i.$$
Additionally, since we must have that $y_t>y_0/2$ for all $t=0,\ldots,T$, then this means that $\sum_{i=1}^tu_i<y_0/2$ for all $t=1,\ldots,T$.
Assume that $\mu>0$, then one can define the input $u_1=y_0/2-\epsilon$ for some $\epsilon>0$ and $u_i=0$ for all $i=2,\ldots,T$. Then, we have that $$\mathbb{E}[z_T|z_0]=\mathbb{E}[z_i|z_0]=z_0+\mu(y_0/2-\epsilon)$$ for all $i=1,\ldots,T$. On the other hand, we also have that
$$y_t=y_0-(y_0/2-\epsilon)=y_0/2+\epsilon>y_0/2$$
for all $t=1,\ldots,T$. Note that in this case the maximum is not attained, it is rather a supremum, which is equal to $z_0+\mu y_0/2$.
If $\mu<0$, then the problem is unbounded from above and one can reach arbitrarily large values for $\mathbb{E}[z_T|z_0]$.
Now, if we assume that $T$ goes to infinity, the policy does not change and one just needs to add zeros in the control law.
Let me know if this is unclear or if I misunderstood the problem.
