Black-Scholes with two options

I have got a Black-Scholes model with portoflio with two options which bond prices are $$V_1$$ and $$V_2$$ (with different maturities or strikes). The interest rate $$r$$ is stochastic and given by: $$dr = u(r,t) dt + w(r,t)dW_t,$$ where $$w$$ and $$u$$ are some functions of $$r$$ and $$t$$.

The porfolio is given as follow: $$\Pi = V_1 - \Delta V_2$$

I need to prove that $$\boxed{\frac{\partial V}{\partial t} + \frac12 \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + (\mu -\lambda_S \sigma)S \frac{\partial V}{\partial S} - rV =0} \quad [1]$$

I found that problem in Paul Wilmott's book "On quantitative finance" on page 857, but I dont understand everything.

We know $$dV = \frac{\partial V}{\partial t}dt + \frac12 \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}dt + \frac{\partial V}{\partial S}dS,\; \; \; [2]$$ and $$d\Pi = dV_1 - \Delta d V_2, \; \; \; d\Pi = r\Pi dt. \; \; \; [3]$$

So after finding out form of $$\Delta =\frac{\partial V_1/ \partial S}{\partial V_2/\partial S}$$

and using $$[2], \; [3]$$ and $$\Delta$$ we can get

$$\frac{1}{\partial V_1/ \partial S}\left[\frac{\partial V_1}{\partial t} + \frac12 \sigma^2 S^2 \frac{\partial^2 V_1}{\partial S^2} - rV_1\right] = \frac{1}{\partial V_2/ \partial S}\left[\frac{\partial V_2}{\partial t} + \frac12 \sigma^2 S^2 \frac{\partial^2 V_2}{\partial S^2} - rV_2\right]. \; \; \; [4]$$

And then the author in mentionet book writes it as

$$\frac{1}{\partial V_1/\partial S}\left[ \frac{\partial V_1}{\partial t} + \frac12 \sigma^2 S^2 \frac{\partial^2 V_1}{\partial S^2} - rV_1\right] = (\mu - \lambda_S \sigma)S \; \; \; [5]$$

Which I don't get - why $$(\mu - \lambda_S \sigma)$$ it's multiplyed by $$S$$? How does $$\lambda$$ or $$\mu$$ looks like?

Later I'm finding out if $$V=S$$ we have $$\lambda_S = \frac{\mu - r}{\sigma}$$ and $$\lambda_S$$ is market price of risk for asset, so if we put that in $$[5]$$ we get

$$\frac{\partial V}{\partial t} + \frac12 \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + rS \frac{\partial V}{\partial S} - rV =0. \; \; \; [6]$$

Is it a reason of why we wrote right side of $$[4]$$ that way? To get $$[6]$$ in that form?

• What’s $V$? It’s not defined. Commented May 13, 2021 at 20:55
• We also don’t know what $w$ or $r$ represent. Commented May 13, 2021 at 21:02
• I edited the question, I hope now it's more clear. Commented May 13, 2021 at 21:31
• Still not clear to me what is the relationship of $V$ to the derivatives $V_1$ and $V_2$ or the portfolio $\Pi$. Commented May 14, 2021 at 11:50
• in $[1]$ $V$ represents $V_1$ (after writing $V_2$ side in $[4]$ to the form of $[5]$ we don't need to use $_1$ in $V_1$). $dV$ in $[2]$ satisfy $V_1$ and $V_2$ Commented May 14, 2021 at 11:59