Compound Poisson Process function expected value For the calculus of a financial derivatives, I need to compute the next expectation:
$$\mathbb{E}\left((\sum_{i=1}^{N_T} (J_i-k))_+\mid J_1+\cdots + J_{N_t}=x \right)$$
where $$(X_t-k)_+= \begin{cases}
             X_t-k    &   \text{if } X_t \geq k \\[6pt]
             0 &  \text{if } X_t < k
             \end{cases}
   $$
where $N_t$ is a Poisson Process, so $\sum_{i=1}^{N_T} J_i$ a compound Poisson process and $t <T$ fixed (non random). Furthermore $J_i$ are independent and identically distributed random variables and also independet of $N_t$. 
Note: I think it would be a good starting point would be the next:
$$\mathbb{E}\left((\sum_{i=1}^{N_T} J_i-k))_+\mid J_1+\cdots + J_{N_t} = x \right) = \mathbb{E}\left(x+(\sum_{i=N_t}^{N_T} J_i-k)_+ \right) = \mathbb{E}\left(\mathbb{E} \left(x+\sum_{i=N_t}^{N_T} J_i-k\mid N_T-N_t=j\right)_+\right) =\mathbb{P}(N_T-N_t=j)(\mathbb{E}(\left(x+\sum_{i=1}^j J_i-k\right)_+ = \sum^{\infty}_{n=0} \mathbb E \left[ \left( x + \sum^{n}_{i=1}J_i -k\right)^+ \right] \frac{e^{-\lambda \tau}(\lambda \tau)^n}{n!} $$
Where,
$$\mathbb E \left[ \left( x + \sum^{n}_{i=1}J_i -k\right)^+ \right] =\mathbb{E} \left[ \left(\sum^{n}_{i=1}J_i -(k-x)\right) 1_{S_n \geq k-x} \right]= \mathbb{E} (\sum^{n}_{i=1}J_i -(k-x))\mathbb{E}(1_{S_n \geq k-x})=(\mathbb{E} (\sum^{n}_{i=1}J_i)-k+x)\mathbb{P}(S_n \geq k-x)=(n\mathbb{E}(J_1)-k+x)(\mathbb{P}(S_n \geq k-x))$$
 A: Denote $J_1 + \cdots J_{N_t}$ by $S_{N_t}$.
$$
\mathbb E \left[ \left( \sum^{N_T}_{i=1}J_i -k\right)^+  \mid  S_{N_t}=x \right] = \mathbb E \left[ \left( \sum^{N_t}_{i=1}J_i + \sum^{N_T}_{i=N_t+1}J_i -k\right)^+  \mid  S_{N_t}=x \right]\\
=\mathbb E \left[ \left( x + \sum^{N_T}_{i=N_t+1}J_i -k\right)^+  \mid  S_{N_t}=x \right]\\
=\mathbb E \left[ \left( x + \sum^{N_{T-t}}_{i=1}J_i -k\right)^+ \right]
$$
where the last line follows by independence of the jumps and independent/stationary increments of the Poisson process. Now condition on the no. of jumps in the interval $[0, T-t]$:
$$
 = \mathbb E \left[ \mathbb E \left[ \left( x + \sum^{N_{T-t}}_{i=1}J_i -k\right)^+ \mid  N_{T-t} = n \right]\right]\\
 = \sum^{\infty}_{n=0} \mathbb E \left[ \left( x + \sum^{n}_{i=1}J_i -k\right)^+ \right]\mathbb P(N_{T-t} = n) \\
= \sum^{\infty}_{n=0} \mathbb E \left[ \left( x + \sum^{n}_{i=1}J_i -k\right)^+ \right] \frac{e^{-\lambda \tau}(\lambda \tau)^n}{n!}
$$
where $\tau = T-t$ and $\lambda$ is the intensity of the jumps . So now it remains to caluclate the expectation, which will depend on the distribution of the jumps:
$$
\mathbb E \left[ \left( x + \sum^{n}_{i=1}J_i -k\right)^+ \right] = \mathbb E \left[ \left(\sum^{n}_{i=1}J_i -(k-x)\right) 1_{S_n \geq k-x} \right]\\
=\mathbb E \left[ \left(\sum^{n}_{i=1}J_i\right) 1_{S_n \geq k-x} \right] - (k-x)\mathbb P \left( S_n \geq  k-x \right)
$$
If for example $J_i \sim \mathcal N (\mu, \sigma^2)$ then $S_n \sim \mathcal N (n\mu, n\sigma^2)$ so in particlar
$$
\mathbb E \left[ \left(\sum^{n}_{i=1}J_i\right) 1_{S_n \geq k-x} \right] = \int_{k-x}^\infty u \frac{1}{\sqrt{2 \pi n}\sigma} \exp \left( \frac{(u-n \mu)^2}{2n\sigma^2} \right) du
$$
As you can see, inserting this expectation into the infinite series and then evaluate the series will not exactly be trivial.
