final Log log = new Log("Loading historical reference data");
try {
final BloombergHistoricalTimeSeriesLoader loader = new BloombergHistoricalTimeSeriesLoader(
getToolContext().getHistoricalTimeSeriesMaster(),
getToolContext().getHistoricalTimeSeriesProvider(),
new BloombergIdentifierProvider(getToolContext().getBloombergReferenceDataProvider()));
for (final SecurityDocument doc : readEquitySecurities()) {
final Security security = doc.getSecurity();
loader.loadTimeSeries(ImmutableSet.of(security.getExternalIdBundle().getExternalId(ExternalSchemes.BLOOMBERG_TICKER)), "UNKNOWN", "PX_LAST", LocalDate.now().minusYears(1), LocalDate.now());
}
loader.loadTimeSeries(_historicalDataToLoad, "UNKNOWN", "PX_LAST", LocalDate.now().minusYears(1), LocalDate.now());