Examples of loadTimeSeries()


Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

    }
    final BloombergHistoricalTimeSeriesLoader loader = new BloombergHistoricalTimeSeriesLoader(
      getToolContext().getHistoricalTimeSeriesMaster(),
      getToolContext().getHistoricalTimeSeriesProvider(),
      new BloombergIdentifierProvider(getToolContext().getBloombergReferenceDataProvider()));
    loader.loadTimeSeries(externalIds, "UNKNOWN", "PX_LAST", LocalDate.now().minusYears(1), LocalDate.now());
  }

  private static List<ExternalId> getFXRateFor(final UnorderedCurrencyPair ccys) {
    final Currency firstCurrency = ccys.getFirstCurrency();
    final Currency secondCurrency = ccys.getSecondCurrency();
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

          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());
      _historicalDataToLoad.clear();
      log.done();
    } catch (final RuntimeException t) {
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

          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());
      _historicalDataToLoad.clear();
      log.done();
    } catch (final RuntimeException t) {
      log.fail(t);
    }
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

    final Set<ExternalId> externalIds = newHashSet(curveNodeIDs);
    final BloombergHistoricalTimeSeriesLoader loader = new BloombergHistoricalTimeSeriesLoader(
        getToolContext().getHistoricalTimeSeriesMaster(),
        getToolContext().getHistoricalTimeSeriesProvider(),
        new BloombergIdentifierProvider(getToolContext().getBloombergReferenceDataProvider()));
    loader.loadTimeSeries(externalIds, "UNKNOWN", "PX_LAST", LocalDate.now().minusYears(1), LocalDate.now());
  }

  private Double getFixedRate(final SecureRandom random,
                              final LocalDate tradeDate,
                              final ExternalId curveId) {
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

    final BloombergHistoricalTimeSeriesLoader loader = new BloombergHistoricalTimeSeriesLoader(
      getToolContext().getHistoricalTimeSeriesMaster(),
      getToolContext().getHistoricalTimeSeriesProvider(),
      new BloombergIdentifierProvider(getToolContext().getBloombergReferenceDataProvider()));
    loader.loadTimeSeries(externalIds, "UNKNOWN", "PX_LAST", LocalDate.now().minusYears(1), LocalDate.now());
  }

  private SwapSecurity makeSwap(final SecureRandom random, final Currency ccy, final LocalDate tradeDate, final Tenor maturity) {

    // get the identifier for the swap rate for the maturity we're interested in (assuming the fixed rate will be =~ swap rate)
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

    for (final Set<ExternalId> externalIds : externalIdSets) {
      if (externalIds.size() > 0) {
        for (final String dataField : dataFields) {
          s_logger.info("Loading time series (field: " + dataField + ", provider: " + dataProvider + ") with external IDs " + externalIds);
          if (write) {
            loader.loadTimeSeries(externalIds, dataProvider, dataField, LocalDate.now().minusYears(1), null);
          }
        }
      }
    }
  }
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

        s_logger.info("replacing {} {}", buid, ticker);
        try {
          LocalDateDoubleTimeSeries hts = htsProvider.getHistoricalTimeSeries(ExternalIdBundle.of(buid),
              BLOOMBERG_DATA_SOURCE_NAME, replaceWithProvider, dataField);
          if (hts != null) {
            Map<ExternalId, UniqueId> addedTS = loader.loadTimeSeries(Sets.newHashSet(buid), replaceWithProvider, dataField, null, null);
            if (addedTS.get(buid) != null) {
              htsMaster.remove(infoDoc.getUniqueId());
              s_logger.info("removed TS with buid={}, ticker={}, dataProvider={}, dataField={}", new Object[] {buid, ticker, findProvider, dataField});
            }
          }
View Full Code Here

Examples of com.opengamma.bbg.loader.hts.BloombergHistoricalTimeSeriesLoader.loadTimeSeries()

    }
    final BloombergHistoricalTimeSeriesLoader loader = new BloombergHistoricalTimeSeriesLoader(
      getToolContext().getHistoricalTimeSeriesMaster(),
      getToolContext().getHistoricalTimeSeriesProvider(),
      new BloombergIdentifierProvider(getToolContext().getBloombergReferenceDataProvider()));
    loader.loadTimeSeries(externalIds, "UNKNOWN", "PX_LAST", LocalDate.now().minusYears(1), LocalDate.now());
  }

  private static List<ExternalId> getFXRateFor(final UnorderedCurrencyPair ccys) {
    final Currency firstCurrency = ccys.getFirstCurrency();
    final Currency secondCurrency = ccys.getSecondCurrency();
View Full Code Here

Examples of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesLoader.loadTimeSeries()

  private Map<ExternalId, UniqueId> addTimeSeries(String dataProvider, String dataField, Set<ExternalId> identifiers, LocalDate startDate, LocalDate endDate) {
    HistoricalTimeSeriesLoader loader = data().getHistoricalTimeSeriesLoader();
    Map<ExternalId, UniqueId> added = Maps.newHashMap();
    if (!identifiers.isEmpty()) {
      added = loader.loadTimeSeries(identifiers, dataProvider, dataField, startDate, endDate);
    }
    return added;
  }

  private Set<ExternalId> buildSecurityRequest(final ExternalScheme identificationScheme, final String idValue) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.