OpenGammaCompilationContext.setRegionSource(context, getRegionSource());
OpenGammaCompilationContext.setOrganizationSource(context, getOrganizationSource());
OpenGammaCompilationContext.setConventionBundleSource(context, getConventionBundleSource());
OpenGammaCompilationContext.setConventionSource(context, getConventionSource());
OpenGammaCompilationContext.setSecuritySource(context, new MasterSecuritySource(getSecurityMaster()));
OpenGammaCompilationContext.setHistoricalTimeSeriesResolver(context, new DefaultHistoricalTimeSeriesResolver(new DefaultHistoricalTimeSeriesSelector(getConfigSource()),
getHistoricalTimeSeriesMaster()));
final DefaultComputationTargetResolver targetResolver = new DefaultComputationTargetResolver(context.getSecuritySource());
targetResolver.addResolver(CurrencyPairs.TYPE, new CurrencyPairsResolver(new ConfigDBCurrencyPairsSource(getConfigSource())));
targetResolver.addResolver(CurrencyMatrixResolver.TYPE, new CurrencyMatrixResolver(new ConfigDBCurrencyMatrixSource(getConfigSource())));
context.setRawComputationTargetResolver(targetResolver);