I'm trying to find the values of $\mu$ and $\sigma$ that minimize the following quadratic loss function:
Note that $\mu\in{(-\infty, \infty}), \sigma>0$
$$ f(\mu, \sigma) = \frac{1}{2}\big(e^{\mu + A\sigma} - r_A\big)^2 +\frac{1}{2}\big(e^{\mu + B\sigma} - r_B\big)^2 $$
Taking the first derivative of both and setting them equal to zero, I get:
$\frac{\partial f(\mu, \sigma)}{\mu} = e^{\mu+A\sigma} \big(e^{\mu + A\sigma} - r_A\big) + e^{\mu+B\sigma} \big(e^{\mu + B\sigma} - r_B\big) = 0$
$\frac{\partial f(\mu, \sigma)}{\sigma} = Ae^{\mu + A\sigma} \big(e^{\mu + A\sigma} - r_A\big) + Be^{\mu + B\sigma} \big(e^{\mu + B\sigma} - r_B\big) = 0$
However I'm getting stuck here on how to combine these two to (try) to get a closed form expression for $\mu$ and $\sigma$
Any help would be greatly appreciated, or any insight into a closed form solution for the above is even possible
Let $x=e^{\mu+A\sigma}$ and $y=e^{\mu+B\sigma}$, then you have $$x^2 - r_A x + y^2 - r_B y = 0 \text{, and } A (x^2 - r_A x) + B(y^2 - r_B y) = 0.$$
Let us assume that $A \neq B$, as otherwise there are infinitely many solutions (which are easy to identify). I will also assume that $r_A$ and $r_B$ are positive. Multiplying the first equation with $A$ and substracting the second equation, you get $(A-B)y^2 - (A-B)r_B y = 0$. Since $A\neq B$, the solutions are $y=0$ and $y=r_B$. The first solution ($y=0$) cannot solve $y=e^{\mu+B\sigma}$, so we have $y=r_B$. Similarly, multiplying the first equality with $B$ and subtracting the second equation, you get $x=r_A$.
The remaining task is solving $e^{\mu+A\sigma} = r_a$ and $y=e^{\mu+B\sigma} = r_b$. Taking the natural logarithm you get a linear system: $\mu+A\sigma=\log(r_a)$ and $\mu+B\sigma=\log(r_b)$. Subtracting the second equation from the first one yields: $$\sigma=\frac{\log(r_a)-\log(r_b)}{A-B}$$ and then you can simply compute $\mu=\log(r_a)-A\sigma$.