I think I'm on the right track for this problem, and I know it's mostly financial, but I'm stuck on a tricky integral. I'm asked:
Assume that the risk free rate is r and that the stock price follows the equation $S(t) = S_0e^{\mu t+\sigma B_t}$ where $B_t$ is a standard Brownian motion and $\mu$, $S_0$, $\sigma$, are constants ($S_0 > 0$, $\sigma > 0$). Assume that K is a positive real number. Determine the formula for the price of the derived security whose payoff at time T depends on the stock price S(T) in the following way:
$g(S(T)) = (\text{max} \{ S(T)-K,0 \})^2 = [(S(T)-K)^+]^2$
Work I've Done So Far
I started by inserting this payoff into the framework for the price of a European Call Option: $$ C_0=e^{-rt}E[((S(T)-K)^+)^2]=e^{-rt}E[((S_0^{\mu t+ \sigma B_t^*}- K)^+)^2]=e^{-rt}E[((S_0^{\mu t+ \sigma \sqrt{t} z}-K)^+)^2] $$ where $Z \sim N(0,1)$
For the expectation, I use the cumulative distribution function for a standard normal variable $\phi(x) =\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^x e^{\frac{-z^2}{2}}dz$, such that: $$ C_0=\frac{e^{-rt}}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} ((S_0^{\mu t+ \sigma \sqrt{t} z}-K)^+)^2*e^{\frac{z^2}{2}}dz \\ =\frac{e^{-rt}}{\sqrt{2 \pi}} \int_{S_0^{\mu t+ \sigma \sqrt{t} z}>K}((S_0^{\mu t+ \sigma \sqrt{t} z}-K)^+)^2*e^{\frac{z^2}{2}}dz \\ =\frac{e^{-rt}}{\sqrt{2 \pi}} \int_{\frac{ln(\frac{K}{S_0})-\mu t}{\sigma \sqrt{t}}}^{\infty}((S_0^{\mu t+ \sigma \sqrt{t} z}-K)^+)^2*e^{\frac{z^2}{2}}dz $$
Where the Problem Arises
Here is where I get confused.
Without the square, I could separate the two integrals and put them in terms of $$ d_\pm = \frac{ln(\frac{S_0}{K})+(r \pm \frac{\sigma^2}{2})t}{\sigma \sqrt{t}} $$ and $$ \phi(x)=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{x}e^{-\frac{z^2}{2}}dz $$
But I can't do that with the square. Should I expand the square and work it that way or is there something I might be missing. Thanks!
The drift $\mu$ should appear nowhere in the option price.
If the stock follows GBM, $dS/S = \mu dt + \sigma dB_t$, then to price the option you replace $\mu$ with the risk-free rate $r$ and apply Ito's lemma to get $d \log S = (r - \sigma^2/2) dt + \sigma dB_t$. This SDE can be solved to obtain
$$S(T) = S_0 e^{(r- \sigma^2/2)T}e^{\sigma \sqrt{T} z}$$
where $z \sim N(0,1)$.
The correct formulation for the call option is
$$C_0 = \frac{e^{-rT}}{\sqrt{2 \pi}}\int_{-\infty}^{\infty}[(S_0e^{(r- \sigma^2/2)T}e^{\sigma\sqrt{T}z}- K)^+]^2e^{- z^2/2} \, dz.$$
The integrand is non-zero if $S_0e^{(r- \sigma^2/2)T}e^{\sigma\sqrt{T}z}- K > 0$ which implies
$$z > -d_{-} = -\frac{\log \frac{S_0}{K} + (r - \sigma^2/2)T}{\sigma \sqrt{T}}.$$
This reduces the integral to
$$C_0 = \frac{e^{-rT}}{\sqrt{2 \pi}}\int_{-d_{-}}^{\infty}[S_0e^{(r- \sigma^2/2)T}e^{\sigma\sqrt{T}z}- K]^2e^{- z^2/2} \, dz \\ = \frac{e^{-rT}}{\sqrt{2 \pi}}\int_{-d_{-}}^{\infty}[X^2e^{2\sigma\sqrt{T}z}-2XKe^{\sigma\sqrt{T}z} +K^2]e^{- z^2/2} \, dz, $$
where $X = S_0e^{(r- \sigma^2/2)T}$.
Now you can proceed to compute the integral.