# Expectation of GeometricBrownianMotionProcess

I am trying to compute $$\mathbb E\left[\max\left(\frac{S_{1/2}+S_1}{2}-K,0\right)\right]$$ where $K=100$ and $S_t$ is a geometric brownian motion (with $S_0=100$, drift $r=0.05$ and volatility $\sigma=0.4$) which satisfies $$dS_t=rS_tdt+\sigma S_tdW_t \quad \text{for} \quad0\le t\le T=1$$

So I use

ClearAll["Global*"]
r = 0.05;
sigma = 0.4;
S0 = 100;
NExpectation[Max[(S12 + S1)/2 - 100, 0],
{S12, S1} \[Distributed] GeometricBrownianMotionProcess[r, sigma, S0][{1/2, 1}]]


which gives

0.754031


But according to my lecture notes the value should be much higher, in fact, it should be $\approx14$ (or $\approx 15$).

But what am I doing wrong? I suppose it might be due to the fact that $S_1$ and $S_{1/2}$ are not independent, but Mathematica probably assumes they are independent.

-
How did you compute S1 and S12? Without that information, I don't see how to work with your problem. – m_goldberg Feb 24 '14 at 0:16
I have not "computed" S1 and S12, they follow the distribution of GeometricBrownianMotionProcess[r, sigma, S0][{1/2, 1}]. This is how the NExpectation-operator works, does it not? – Tom Feb 24 '14 at 0:23
Another approach is to use this: NExpectation[ Max[(S12 + S1)/2 - 100, 0], {S12 \[Distributed] GeometricBrownianMotionProcess[r, sigma, S0][1/2], S1 \[Distributed] GeometricBrownianMotionProcess[r, sigma, S0][1]}] which gives 0.384216 (not 14 either). – Tom Feb 24 '14 at 0:27
You dont want S1 and S12 to be independent, so this last approach is not going to give the result. According to the documentation, SliceDistribution[proc, {t1,..., tk}] represents the joint distribution of process states at times t1<...<tk. This can also be input as proc[{t1,...,tk}] as you did in your original post. – Eckhard Feb 24 '14 at 0:30
@m_goldberg S1 and S12 are just variables that follow the given distribution. They don't have values or definitions for them. – R. M. Feb 24 '14 at 0:32

NExpectation[
Max[(S12 + S1)/2 - 100, 0], {S1, S12} \[Distributed]
SliceDistribution[ GeometricBrownianMotionProcess[r, sigma, S0], {1/2, 1}],
Method -> "MonteCarlo"]


or

NExpectation[
Max[(S12 + S1)/2 - 100, 0], {S1, S12} \[Distributed]
SliceDistribution[ GeometricBrownianMotionProcess[r, sigma, S0], {1/2, 1}],
Method -> {"NIntegrate", {MinRecursion -> 1, MaxRecursion -> 10}}]


Give 14.8153 and 14.8257 respectively...

-
Thanks for pointing out how to pass Nintegrate options to NExpectation. – Eckhard Feb 24 '14 at 1:28
@Eckhard: one of the few areas the MMA documentations blows is making clear the "passing options to underlying methods..." cases :-( – ciao Feb 24 '14 at 1:32
Exactly what I was looking for! Just one follow-up question: The value from the MonteCarlo-version obviously varies every time, but the NIntegrate-version remains the same. So I assume the latter one is more accurate, but is there any way of knowning how accurate 14.8257 actually is? – Tom Feb 24 '14 at 1:35
@Tom - you can pass accuracy/precision requirements via options, and check final accuracy/precision with the Accuracy and Precision` functions. And yes, assuming proper evaluation of the integral, I suppose one could call it "more accurate" in the loose sense of the word (the mean of MC results would be be same). I'm sure experts in that question will chime in... – ciao Feb 24 '14 at 1:41