I am busy with a numerical simulation and
I want the calculate the following expectation under the risk neutral measure:
$\mathbb{E_Q}(\max(S-1,0))$.
$S$ is some variable that I calculated using Monte Carlo techniques. I have 100 realizations of S.
I have no idea how to perform the calculation I want. I have looked here on page 4 equation (14), which is somewhat similar, but not quite since $S$ is in my case already determined by my realizations.
Can anyone help me out?
Define the indicator function $\mathbf 1_{\{S-1>0\}}$ taking value $1$ when $S-1>0$, zero otherwise. Then we can write $$\max\{S-1,0\} = (S-1)\cdot\mathbf 1_{\{S-1>0\}} + 0\cdot (1-\mathbf 1_{\{S-1>0\}}) = (S-1)\cdot\mathbf 1_{\{S-1>0\}}$$
Then
$$E[\max\{S-1,0\}]=E[(S-1)\cdot\mathbf 1_{\{S-1>0\}}] = \\=E[(S-1)\cdot\mathbf 1_{\{S-1>0\}}\mid 1_{\{S-1>0\}}=1]\cdot P( 1_{\{S-1>0\}}=1)$$
$$=E[(S-1)\mid S>1]\cdot P(S>1)$$
Since your variable is simulated, denote $n$ the number of realizations of $S$ and collect all $m<n$ realizations of $S$ above unity as the first $m$ realizations. Then
$$\hat E[(S-1)\mid S>1] = \frac 1m\sum_{i=1}^ms_i, \qquad \hat P(S>1) = \frac mn$$
which gives
$$\hat E[\max\{S-1,0\}] = \frac 1n\sum_{i=1}^ms_i$$
Whether this estimate is accurate enough, it is for you to judge depending on the problem at hand.