# Pricing log-contract with Black-Scholes PDE

I was wondering if someone could help me with a problem, regarding the Merton Black Scholes PDE. I have an exam soon and this question on an old exam has been bothering me and a friend for quite a while. We simply don't get it.

The question goes this way:

The payoff of a so-called European log-contract is $g \left( S_T \right) = \ln \left( S_T / K \right)$ where $K$ is the strike price and S is a risky non-dividend MBS asset. Find the price $c(s,t)$ of such asset. Hint: Use the Black-Scholes PDE and give yourself the fact that c has the following form:

$$c(s,t) = a(t) + b(t) \ln(s/K)$$

Find the functions $a(t)$ and $b(t)$.

I've tried to figure out the solution and see if there's anything online, but nothing works. Using the BS-PDE is not helping. All help and advice would be GREATLY appreciated!

The B/S PDE for a contingent claim $V(S, t)$ is

$$\frac{\partial V}{\partial t} + r S \frac{\partial V}{\partial S} + \frac{1}{2} \sigma^2 S^2 \frac{\partial V^2}{\partial S^2} - r V = 0$$

subject to the terminal condition $V(S, T) = \ln(S / K)$. According to the hint, the solution to $V(S, t$) takes the form

$$V(S, t) = a(t) + b(t) \ln(S / K).$$

Since the terminal condition has to hold for all $S$, it follows that $a(T) = 0$, $b(T) = 1$.

Take the partial derivatives of the guess to get

\begin{eqnarray} \frac{\partial V}{\partial t}(S, t) & = & a'(t) + b'(t) \ln(S / K),\\ \frac{\partial V}{\partial S}(S, t) & = & b(t) \frac{1}{S},\\ \frac{\partial^2 V}{\partial S^2}(S, t) & = & -b(t) \frac{1}{S^2}.\\ \end{eqnarray}

Substituting back yields

$$a'(t) + b'(t) \ln(S / K) + r b(t) - \frac{1}{2} \sigma^2 b(t) - r a(t) - r b(t) \ln(S / K) = 0.$$

Since for each fixed $t$, this solution has to hold for all values of $S$, we collect terms containing $\ln(S / K)$ and get the ODEs

\begin{eqnarray} 0 & = & a'(t) + \left( r - \frac{1}{2} \sigma^2 \right) b(t) - r a(t),\\ 0 & = & \left( b'(t) - r b(t) \right) \ln(S / K) \end{eqnarray}

The solution to the second ODE that satisfies $b(T) = 1$ is

$$b(t) = e^{-r (T - t)}.$$

The solution to the first ODE that satisfies $a(T) = 0$ is

$$a(t) = b(t) \left( r - \frac{1}{2} \sigma^2 \right) (T - t).$$

Combining these results yields

$$V(S, t) = e^{-r (T - t)} \left[ \left( r - \frac{1}{2} \sigma^2 \right) (T - t) + \ln(S / K) \right].$$