@pytest.mark.parametrize('config', [Test1])
def test_portfolio_regret_optimizer(config, main_cubes, cvar_cubes):
    opt = PortfolioRegretOptimizer(main_cubes, cvar_cubes, config.prob.as_array(), rebalance=True, sum_to_1=True, time_unit='quarterly')
    opt.set_bounds(config.lb.as_array(), config.ub.as_array())
    opt.maximize_returns(max_cvar=config.cvar.as_array())
    obj_funcs = opt._objectives.max_returns
    assert (scenario_solution_equal_or_better(obj_funcs, opt.solution.scenario_optimal, config.solutions) or regret_is_lower(opt.solution.proportions, config.proportions, opt.solution.scenario_optimal, obj_funcs, config.prob.as_array()))
@pytest.mark.parametrize('config', [Test1])
def test_portfolio_regret_optimizer(config, main_cubes, cvar_cubes):
    opt = PortfolioRegretOptimizer(main_cubes, cvar_cubes, config.prob.as_array(), rebalance=True, sum_to_1=True, time_unit='quarterly')
    opt.set_bounds(config.lb.as_array(), config.ub.as_array())
    opt.maximize_returns(max_cvar=config.cvar.as_array())
    obj_funcs = opt._objectives.max_returns
    assert (scenario_solution_equal_or_better(obj_funcs, opt.solution.scenario_optimal, config.solutions) or regret_is_lower(opt.solution.proportions, config.proportions, opt.solution.scenario_optimal, obj_funcs, config.prob.as_array()))