I have a problem where I need to relever equity volatility and take into account debt. I'm trying to solve a system of nonlinear equations for $\sigma_v,V$ using $f(\sigma_v,V) = VN(d_1)-De^{-R_ft}N(d_2)-E$ and $g(\sigma_v,V)=\sigma_e\frac{E}{VN(d_1)}-\sigma_v$. I wanted to do the Newton method using R but I think the first thing I'm going to need to do is a partial differentiation of the two functions with respect to $\sigma_v$ and $V$ to create the Jacobian. I'm worried about differentiating the first equation because of the CDF. As for the equation I will use the quotient rule. $\frac{\partial{f}}{\partial{\sigma_v}}=0N(d_1)+VN'(d_1)-0N(d_2)+De^{-R_ft}N'(d_2)$. My question is about $\frac{\partial{N(d_1)}}{\partial{\sigma_v}}$ and $\frac{\partial{N(d_1)}}{\partial{V}}$. Since $N(d_1)=\frac{1}{2}\left[1+e^{\frac{log\frac{V}{D}+(R_f+.5\sigma_v^{2})t}{\sigma_v\sqrt{t}\sqrt{2}}}\right]$ how would I go about differentiating it w.r.t. $\sigma_v$ and $V$ or is there an easier way to solve this system of equations?
1 Answer
For one thing, what you have written is incorrect. Black-Scholes uses the standard normal CDF:
$$N(d_1) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{d_1} e^{-x^2/2} \, dx$$
So $N'(d_1) = \frac{e^{-d_1^2/2} }{\sqrt{2 \pi}}$ and using the chain rule we get
$$\frac{\partial N(d_1)}{\partial V} = N'(d_1) \frac{\partial d_1}{\partial V} = \frac{e^{-d_1^2/2} }{\sqrt{2 \pi}}\frac{1}{V\sigma_v\sqrt{t}}$$
Compute the other partial derivatives in the same way and then apply the Newton-Raphson method.