final FunctionRepository functionRepository = getFunctionRepository() != null ? getFunctionRepository() : generateFunctionRepository();
final CompiledFunctionService compiledFunctions = new CompiledFunctionService(functionRepository, new CachingFunctionRepositoryCompiler(), functionCompilationContext);
compiledFunctions.initialize();
vpFactBean.setFunctionCompilationService(compiledFunctions);
final MarketDataProviderResolver marketDataProviderResolver = getMarketDataProviderResolver() != null ? getMarketDataProviderResolver() : generateMarketDataProviderResolver();
vpFactBean.setMarketDataProviderResolver(marketDataProviderResolver);
vpFactBean.setConfigSource(configSource);
vpFactBean.setViewPermissionProvider(new DefaultViewPermissionProvider());
vpFactBean.setNamedMarketDataSpecificationRepository(new InMemoryNamedMarketDataSpecificationRepository());