Generating function of the stopping time Let $X_t$ be a generalized Wiener process with drift rate $\mu$ and variance $\sigma^2$, and  let $\tau$ be the stopping time 
$$\tau:=\inf \left\{ t\geq0: X_t= b\right\}, \quad b\geq0 $$
Can anyone give me some insights on how to compute the generating function:
$$  E[\mathrm{e}^{-\lambda\tau}], \quad \lambda\geq0 $$
Many thanks in advance.
 A: mejor te escribo en castellano no? Tengo problemas con el ejercicio 2 apartados 1 y 3 del tema 1, así como con el ejercicio 1 del tema 2 y el ejercicio 2 apartado d del tema 2. ¿Podrías ayudarme?
Respecto al que me pides, mira este link:
http://www.columbia.edu/~hz2244/teaching/Lec9.pdf
A ver si hay suerte!!!
Saludos
A: Here's a solution, perhaps not in the most formal language (i.e. I may be skipping some technical details), and hopefully without any major errors.
If $\tau_b$ is the time until $X_t=b\ge0$ is reached, let us define
$$F_\lambda(b)=\text{E}\left[e^{-\lambda\tau_b}\right]$$
for $\lambda>0$, with the convention that
$e^{-\lambda\tau_b}=0$ if $X_t=b$ is never reached.
First, we note that $F_\lambda(0)=1$, and that $F_\lambda(b)$ is decreasing in $b$.
If $b>0$, $X_T=x$ and $X_s<b$ for $s<T$, we can let $\hat{X}_s=X_{T+s}-x$ with corresponding $\hat\tau_b=\tau_{x+b}-T$, which makes
$$
\text{E}_T\left[e^{-\lambda\tau_b}\middle|X_T=x\right]
=\text{E}\left[e^{-\lambda(\hat\tau_{b-x}+T)}\right]
=e^{-\lambda T}\cdot\text{E}\left[e^{-\lambda\hat\tau_{b-x}}\right]
=e^{-\lambda T}\cdot F_\lambda(b-x).
$$
However, if we let $T=dt$, and compute to the first order in $dt$, we get
$$
\begin{split}
F_\lambda(b)
=&\text{E}\left[\text{E}_{dt}\left[e^{-\lambda\tau_b}\middle|X_{dt}\right]\right]
=\text{E}\left[e^{-\lambda\,dt}\cdot F_\lambda(b-X_{dt})\right]
\\
=&F_\lambda(b)+dt\cdot\left\{-\lambda F_\lambda(b)
    -F_\lambda'(b)\,\text{E}[X_{dt}]
    +\tfrac{1}{2}F_\lambda''(b)\,\text{E}[X_{dt}^2]
  \right\}
\\
=&F_\lambda(b)+dt\cdot\left\{-\lambda F_\lambda(b)
    -\mu F_\lambda'(b)+\tfrac{1}{2}\sigma^2 F_\lambda''(b)
  \right\}
\end{split}
$$
which provides us with the differential equation
$$
\lambda F_\lambda(b)+\mu F_\lambda'(b)-\tfrac{1}{2}\sigma^2 F_\lambda''(b)=0.
$$
We can express the solutions of this as $\alpha_1e^{-\beta_1b}+\alpha_2e^{-\beta_2b}$ where $\beta_i$ are the roots of $\lambda-\mu\beta-\sigma^2\beta^2/2=0$. The equation has one negative and one positive root, and since $F_\lambda(b)$ is declining (towards zero) as $b$ increases only the positive $\beta$ is permitted. Applying the condition $F_\lambda(0)=1$ then leaves
$$
F_\lambda(b)=e^{-\beta b}
\text{ where }
\beta=\sqrt{\frac{\mu^2}{\sigma^4}+\frac{2\lambda}{\sigma^2}}-\frac{\mu}{\sigma^2}.
$$
Note that if we set $\lambda=0$ this give the likelihood that $X_t=b$ is ever reached, which is $1$ if $\mu\ge0$.
