# An integral with density function of $N(\hat{a}, \frac{1}{s})$

I am stucked on this integral, which is from a research paper in Finance, for a while, so can anyone please help walk me through how we can get the answer on the RHS of this integral?

Prove: $\int_{-\infty}^{\infty} \max\ (0,\frac{t\hat{a}+sy}{t+s})\sqrt{\frac{H}{2\pi}}e^{-\frac{H}{2}(y-\hat{a})^{2}}dy= \hat{a}\ N[-(\frac{-t\hat{a}}{s}-\hat{a})\sqrt{H}] +\frac{\sqrt{H}}{t}\phi [(\frac{-t\hat{a}}{s}-\hat{a})\sqrt{H}]$

where N is distribution function of standard normal random variable, $\phi$ is its corresponding density function, and y follows normal distribution $N(\hat{a}, \frac{1}{s})$.

I also can't see how from the equation above, the author came up with these partial derivatives, given $H=\frac{st}{s+t}$:

$\frac{\partial\ V}{\partial\hat{a}} = N + \hat{a}\phi\sqrt{H} + \frac{H}{t}(\frac{-t\hat{a}}{s}-\hat{a})\phi\sqrt{H}$ = N, $\ \frac{\partial\ V}{\partial\frac{t\hat{a}}{s}}=0$

$\frac{\partial V}{\partial t} = (-1+\frac{s}{2s+2t})(\frac{\sqrt{H}}{t^2})\phi$, $\frac{\partial V}{\partial s} = \frac{t}{2(t+s)^2\sqrt{H}}$

Hint: For $\beta>0$, we have: $$\int_{-\infty}^\infty \max(0,\alpha+\beta x)\phi(x)\,dx = \int_{-\alpha/\beta}^\infty (\alpha+\beta x)\phi(x)\,dx =\alpha N(\alpha/\beta) + \beta\phi(\alpha/\beta),$$ by using $$\int \phi(x)dx = N(x) +C, \; \int x\phi(x)dx = -\phi(x) +C.$$

To use it in your calculation apply change of variable $x = \sqrt{H}(y-\hat{a})$.

Edit: It seems to me that original random variable should have been ${\rm Normal}(\hat{a}, 1/H)$ (not ${\rm Normal}(\hat{a}, 1/s)$).

Edit2: Denoting by $V(\alpha, \beta):= \alpha N(\alpha/\beta) + \beta\phi(\alpha/\beta)$, we get $$\frac{\partial V}{\partial \alpha} = N(\alpha/\beta)+ \alpha/\beta N'(\alpha/\beta) +\phi'(\alpha/\beta)$$ $$= N(\alpha/\beta)+ \alpha/\beta \phi(\alpha/\beta) -\alpha/\beta\phi(\alpha/\beta)$$ $$= N(\alpha/\beta).$$

Edit3: $$\int_{-\infty}^\infty\max\left(0,\frac{t\hat{a}+sy}{t+s}\right)\sqrt{\frac{H}{2\pi}}e^{-\frac{H}{2}(y-\hat{a})^{2}}dy$$ $$= \int_{-\infty}^\infty\max \left(0,\frac{t\hat{a}+s\left(x/\sqrt{H}+\hat{a}\right)}{t+s}\right)\sqrt{\frac{1}{2\pi}}e^{-\frac{1}{2}x^{2}}dx$$ $$= \int_{-\infty}^\infty\max \left(0,\hat{a}+\frac{s}{\sqrt{H}(t+s)}x \right)\phi(x) dx$$ We now take $$\alpha = \hat{a}$$ and $$\beta = \frac{s}{\sqrt{H}(t+s)}, \quad \frac{\alpha}{\beta} = \left(\hat{a}+\frac{t\hat{a}}{s}\right)\sqrt{H}.$$ Using the formula above, we get: $$\hat{a} N\left(\left(\hat{a}+\frac{t\hat{a}}{s}\right)\sqrt{H}\right) + \frac{s}{\sqrt{H}(t+s)}\phi\left(\left(\hat{a}+\frac{t\hat{a}}{s}\right)\sqrt{H}\right)$$ Using $H:=st/(s+t)$ (hence $\beta = \sqrt{H}/t$) as in the source paper, we have further: $$V(\hat{a},s,t):=\hat{a} N\left(\left(\hat{a}+\frac{t\hat{a}}{s}\right)\sqrt{H}\right) + \frac{\sqrt{H}}{t}\phi\left(\left(\hat{a}+\frac{t\hat{a}}{s}\right)\sqrt{H}\right)$$

Edit4 Similar to Edit2: $$\frac{\partial V}{\partial\hat{a}}= N\left(\left(\hat{a}+\frac{t\hat{a}}{s}\right)\sqrt{H}\right).$$

Edit5 Introducing variable $Y:=\hat{a}t/s$, we have $$V= \hat{a} N\left(\left(\hat{a}+Y\right)\sqrt{H}\right) + \frac{\sqrt{H}}{t}\phi\left(\left(\hat{a}+Y\right)\sqrt{H}\right).$$ So: $$\frac{\partial V}{\partial Y} = \hat{a} \phi\left(\left(\hat{a}+Y\right)\sqrt{H}\right) \sqrt{H} -\frac{\sqrt{H}}{t}\left(\hat{a}+Y\right)\sqrt{H}\phi\left(\left(\hat{a}+Y\right)\sqrt{H}\right)\sqrt{H} = 0,$$ due to observation (using definition of $Y$ and $H$): $$\frac{\sqrt{H}}{t}\left(\hat{a}+Y\right)\sqrt{H} = \hat{a}.$$

Edit6 Noting that:

$$V= \hat{a} N\left(\frac{\hat{a}t}{\sqrt{H}}\right) + \frac{\sqrt{H}}{t}\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right),$$

we get:

$$\frac{\partial V}{\partial s} =\hat{a} \phi\left(\frac{\hat{a}t}{\sqrt{H}}\right) \left(\frac{\hat{a}t}{\sqrt{H}}\right)'_s +\left( \frac{\sqrt{H}}{t}\right)'_s\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)$$ $$- \frac{\sqrt{H}}{t} \frac{\hat{a}t}{\sqrt{H}} \phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)\left(\frac{\hat{a}t}{\sqrt{H}}\right)'_s$$ $$= \left( \frac{\sqrt{H}}{t}\right)'_s\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)=\frac{H'_s}{2t\sqrt{H}} \phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)= \frac{t}{2(t+s)^2\sqrt{H}}\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)$$

Edit7: Same calculation sequence gives:

$$\frac{\partial V}{\partial t} = \left( \frac{\sqrt{H}}{t}\right)'_t\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)=\frac{\frac{H'_t}{2\sqrt{H}}t-\sqrt{H}}{t^2}\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)$$ $$= \left(\frac{H'_t}{2{H}}t -1\right) \frac{\sqrt{H}}{t^2}\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)=\left( \frac{s}{2(s+t)}-1\right) \frac{\sqrt{H}}{t^2}\phi\left(\frac{\hat{a}t}{\sqrt{H}}\right)$$

• Thank you very much for your helpful answer. May you elaborate on how did you get the two integrals, and how the two integrals become when $x\rightarrow \infty$? And do you see how we can end up with the two partial derivatives above from the equation? – user177196 Dec 21 '14 at 2:54
• Btw, even after using your two integrals and the suggested change of variables, I don't see how the coefficients $\frac{1}{t+s}$ and $\frac{s}{t+s}$ became $\hat{a}$ and $\frac{\sqrt{H}}{t}$, respectively. – user177196 Dec 21 '14 at 3:26
• $N'(x)=\phi(x)$ and $\phi'(x)=-x\phi(x)$ by their definitions as functions, and $\phi(x)$ goes to $0$ when $x$ goes to $\infty$. – ir7 Dec 21 '14 at 3:29
• I added Edit2 as an example of manipulation of derivatives with respect to parameters. – ir7 Dec 21 '14 at 3:30
• I also got the same for that derivative! Many thanks for your great help, ir7:) Merry Xmas and Happy New Year to you and your family!! – user177196 Dec 24 '14 at 3:02