Security value of log contract and stochastic calculus I am studying the geometric Brownian motion of stock S with an expected return and volatility. And we can write the standard GBM as the form $dS(t) = \mu S(t)dt + \sigma S(t)dZ(t)$ where Z follows a standard normal distribution. And we can use it to calculate some derivatives based on stock S. And there is a special derivative called log contract $L(S,t)$ that pays off $\ln S(T)$, where S(T) is the value of the stock price at time T.
Based on previous GBM and Ito process, we can get
$$d\ln S(t) = (\mu - \frac{\sigma^2}{2})dt + \sigma dZ(t)$$
Could someone explain how to calculate the value of the security $L(S,t)$ in terms of stock price $S(t)$ at time t? And will this solution also satisfy the Black-Scholes PDE? I think the previous one satisfies.
 A: The value $L(S(t),t)$ at time $t < T$ is the discounted expectation conditioned on information known at $t$ of the contract payoff at time $T$ under the risk-neutral probability measure $Q$, that is
$$L(S(t),t)) = e^{-r(T-t)}\mathbb{E}^Q[\ln S(T) \, |\, \mathcal{F}_t],$$
where $r$ is the risk-free rate.
In the risk-neutral world, the security follows the process
$$d\ln S(t) = (r - \frac{\sigma^2}{2})\,dt + \sigma \,dZ(t)$$
Integrating over $[t,T]$, we get, in terms of a standard normal random variate $\xi \sim \mathcal{N}(0,1)$,
$$\ln S(T) = \ln S(t) + (r - \frac{\sigma^2}{2})(T-t) + \sigma\sqrt{T-t}\,\xi,$$
and, taking the expected value,
$$\tag{*}L(S(t),t))  = e^{-r(T-t)} \left[\ln S(t) + (r - \frac{\sigma^2}{2})(T-t) \right]$$
This could also be obtained by solving the Black-Scholes PDE for $L(S,t)$,
$$\frac{\partial L}{\partial t} + r S \frac{\partial L}{\partial S} + \frac{1}{2} \sigma^2 S^2 \frac{\partial L^2}{\partial S^2} - r L = 0,$$
with terminal condition $L(S,T) = \ln S$. Assuming a solution of the form $L(S,t) = \alpha(t) + \beta(t) \ln S$ and substituting into the PDE, leads to the same solution as in (*).
