# derivation of general black-scholes formula

I would like to find a derivation for the Black-Scholes fomrula in the general case (i.e., where the volatility function $\sigma : [0,T] \to \mathbb{R}^+$ and the investment rate $r: [0,T] \to \mathbb{R}^+$ are continuous deterministic functions of $t$ and its associated replicating strategy.

I know that for constant $\sigma, r$, the Black-Schole's formula is $C_t = c(S_t, T-t) = S_tN(d_1(S_t, T-t)) - Ke^{-r(T-t)}N(d_2(S_t, T-t))$ where $N$ is the standard Gaussian CDF and $d_{1,2}(S_t, T-t) = \frac{\ln(S_t/K) + (r\pm \sigma^2)t}{\sigma\sqrt{T-t}}$ and the replicating strategy, $\phi$, satisfies $\phi_t^1 = \partial_{s}c(S_t, T-t), \phi_1^2 = e^{-rt}(c(S_t, T-t) - \phi_t^1 S_t)$

Now for he general case. We know that under the risk-neutral measure $\mathbb{P}^*$, $S$ satisfies $dS_t = r(t)S_t dt + \sigma(t) S_t dW_t^*$, where $W_t^*$ is Brownian motion under $\mathbb{P}^*$, and this has the unique solution $$S_t = S_0 \exp \left(\int_0^t \sigma(u) dW_u^* + \int_0^t (r(u) - \frac{1}{2}\sigma^2(u)) du \right)$$

Now, using the risk neutral formula, we know that the price of the European call option satisfies $$C_t = e^{-\int_t^Tr(u)du}E_{\mathbb{P}^*}((S_T - K)^+ | \mathcal{F}_t)$$ How do I use this combined with my formula for $S_t$ to obtain the generalised formula? Also, would I be right in saying that the generalised replicating strategy is the same?

\begin{align} S_t &= S_0 \exp \left(\int_0^t \sigma(u) dW_u^* + \int_0^t \left(r(u) - \frac{1}{2}\sigma^2(u)\right) du \right) \\ &= F(0,t) \mathcal{E}\left( \int_0^t \sigma(u) dW_u^* \right) \end{align} If we let $$\mathcal{E}(X_t) := \exp\left(X_t - \frac{1}{2}\langle X \rangle_t\right)$$ the Doléans Dade exponential of a process $(X_t)_{t \geq 0}$ and $$F(0,t) := \Bbb{E}_0^*\left[S_t \right] = S_0 \exp \left(\int_0^t r(u) du\right)$$ represent the underlying forward price.
In any case, you observe that $\forall T \geq 0$, $S_T$ is lognormally distributed since $$\ln(S_T) \sim N \left( \ln \left(F(0,T)\right) - \frac{1}{2}\int_0^T \sigma^2(u) du, \int_0^T \sigma^2(u) du \right)$$ which you should compare to the traditional Black-Scholes result $$\ln(S_T) \sim N \left( \ln \left(F(0,T)\right) - \frac{1}{2}\sigma_{BS}^2 T, \sigma_{BS}^2 T\right)$$ meaning you can treat this new case as the standard one with an equivalent "BS" volatility given by $$\hat{\sigma}_T := \sqrt{ \frac{1}{T} \int_0^T \sigma^2(u) du }$$
Repeating the usual steps you then find that standard $d_\pm$ terms involved in the original BS formula need to be replaced by their time-dependent counterparts $$d_\pm(T) = \frac{ \ln\left(\frac{F(0,T)}{K}\right) \pm \frac{1}{2}\hat{\sigma}_T^2 T}{\hat{\sigma}_T \sqrt{T}}$$ where
• Nice answer. I think there are some typos in the $\hat{\sigma}_T$ at the bottom: $\hat{\sigma}_T = \sqrt{\frac{1}{T} \int_0^T \sigma^2(u) \mathrm{d}u}$? – LocalVolatility Jun 7 '18 at 8:21