@Override
public IPortfolioSelector create(ParameterBlock params, Context context) {
ParameterBlock rngParameters =
ParameterUtils.getFactorySubBlock(params, RandomGeneratorFactory.class);
RandomGeneratorFactory mbFac =
SimSystem.getRegistry().getFactory(
AbstractRandomGeneratorFactory.class, rngParameters);
return new StochSearchPortfolioSelector(params.getSubBlockValue(
SAMPLE_SIZE, DEFAULT_SAMPLE_SIZE), mbFac.create(rngParameters, SimSystem.getRegistry().createContext()));
}