Update run_SS.py to allow for different starting guesses upon failure
We discovered after the fact that PR #767 introduced two failures in test_user_inputs.py (see this comment from the conversation thread in PR #775). The two test failures were easily resolved in PR #775 by slightly changing the initial guess for the steady-state interest rate initial_guess_r_SS passed in to the run_SS() function in SS.py. I think this means that something about the scipy.optimize.root() function is less robust than the scipy.optimize.fsolve() function we were using previous to that PR.
This solution worked for the tests, and it would work for any user running an OG-Core-dependent model on their local machine manually trying different initial guesses. But it would not work for someone running an OG model on Compute.Studio, with its fixed initial guess values.
I propose we augment the run_SS() algorithm in SS.py to include a try/except structure that tries different initial guesses for r_SS if the steady-state equilibrium does not solve. The current default initial guess for r_SS in default_parameters.json is initial_guess_r_SS = 0.0648. PR #775 successfully solved the two failing tests by changing the initial guess to initial_guess_r_SS = 0.06. I recommend an algorithm that tries four different values in succession until one solves: -epsilon, +epsilon, -2epsilon, +2epsilon. My experience is that these four guesses, in addition to the default initial guess, will be sufficient to find a steady-state in most cases. Then we can add to the guesses as more failures come up.
cc: @jdebacker