Basics
Stochastic refers to a random variable in our objective function, that's why we can only optimize regarding the expectation.
\[
\begin{array}
{cl}\min _{\mathbf{x}} & \mathbb{E}[F(\mathbf{x}, \xi)] \\ & \mathbf{x} \in \mathcal{X} .
\end{array}
\]
Scenario Optimization with Piecewise Linear Utility
In the following example, a two-stage model, where we start from initial capital \(W_0\), and would like to maximize the utility in the next stage, meanwhile meet some liability \(L\).
\[
\begin{array}{ll}\max _{\mathbf{x}} & \mathbb{E}(U(W)) \\ & W=W_0 \cdot\left(1+\mathbf{r}^{\top} \mathbf{x}\right)-L \\ & \mathbf{1}^{\top} \mathbf{x}=1 \\ & \mathbf{x} \geq \mathbf{0}\end{array}
\]
Denote the utility function as \(U(w)=\min \{a w, b w\}\), where \(0 \leq a<b\). Let's discretize the randomness here to \(S\) possible scenario each with probability \(p_k\).
\[
\mathbf{r}^k=\left[\begin{array}{lll}r_1^k & \ldots & r_n^k\end{array}\right]^{\top}, k=1, \ldots, S
\]
Then the optimization problem can be written as the following. Notice that the expectation is taken out writing as a summation. And we introduced a redundant variable \(u\) that turns the problem into linear constraints.
\[
\begin{array}{ll}\max _{\mathbf{x}, \mathbf{u}} & \sum_{k=1}^S p_k u_k \\ \text { s.t. } & u_k \leq a\left(W_0 \cdot\left(1+\left(\mathbf{r}^k\right)^{\top} \mathbf{x}\right)-L\right), k=1, \ldots, S \\ & u_k \leq b\left(W_0 \cdot\left(1+\left(\mathbf{r}^k\right)^{\top} \mathbf{x}\right)-L\right), k=1, \ldots, S \\ & \mathbf{1}^{\top} \mathbf{x}=1 \\ & \mathbf{x} \geq \mathbf{0} .\end{array}
\]