Computing Optimal Recovery Policies for Financial Markets