I can't seem to figure out how to do the following: compute the implied correlation $ρ_{imp}$ by using the observed market price $M_{quote}$ of a Margrabe option, and solving the non-linear equation shown below:
$$M_{quote} = e^{−q_0T}\times S_0(0)\times N(d_+)−e^{−q_1T}\times S_1(0)\times N(d_−)$$
where:
$$\begin{align} & d_\pm = \frac{\log\frac{S_0(0)}{S_1(0)}+(q_1 − q_0 ±σ^2/2)T}{\sigma\sqrt{T}} \\[4pt] & \sigma = \sqrt{\sigma^2_0 + \sigma^2_1 − 2\rho_{imp}\sigma_0 \sigma_1} \end{align}$$
Note that $d_− = d_+ − σ\sqrt{T}$.