Examples of LatestHistoricalMarketDataSpecification


Examples of com.opengamma.engine.marketdata.spec.LatestHistoricalMarketDataSpecification

    }
  }

  private static MarketDataSpecification createLatestHistoricalSpec(String specStr) {
    if (specStr.isEmpty()) {
      return new LatestHistoricalMarketDataSpecification();
    }
    if (!specStr.startsWith(":")) {
      throw new IllegalArgumentException(specStr + " doesn't match 'latesthistorical[:time series rating]'");
    }
    String timeSeriesRating = specStr.substring(1).trim();
    if (timeSeriesRating.isEmpty()) {
      throw new IllegalArgumentException(specStr + " doesn't match 'latesthistorical[:time series rating]'");
    }
    return new LatestHistoricalMarketDataSpecification(timeSeriesRating);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LatestHistoricalMarketDataSpecification

    } else {
      valuationInstant = Instant.now();
    }
    final boolean historicalInput = getCommandLine().hasOption(HISTORICAL_OPTION);

    final MarketDataSpecification marketDataSpecification = historicalInput ? new LatestHistoricalMarketDataSpecification() : MarketData.live();
    final ViewExecutionOptions viewExecutionOptions = ExecutionOptions.singleCycle(valuationInstant, marketDataSpecification, EnumSet.of(ViewExecutionFlags.AWAIT_MARKET_DATA));

    final List<RemoteViewProcessor> viewProcessors = getRemoteComponentFactory().getViewProcessors();
    if (viewProcessors.size() == 0) {
      s_logger.warn("No view processors found at {}", getRemoteComponentFactory().getBaseUri());
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LatestHistoricalMarketDataSpecification

  /** Builds intances of {@link LatestHistoricalMarketDataSpecification}. */
  private static class LatestHistoricalSpecificationBuilder implements SpecificationBuilder {

    @Override
    public MarketDataSpecification build(JSONObject json) throws JSONException {
      return new LatestHistoricalMarketDataSpecification(
          json.getString(MarketDataSpecificationJsonReader.RESOLVER_KEY));
    }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LatestHistoricalMarketDataSpecification

  }

  @Test
  public void latestHistoricalValid() {
    MarketDataSpecification specNoRating = MarketDataSpecificationParser.parse("latesthistorical");
    assertEquals(new LatestHistoricalMarketDataSpecification(), specNoRating);
    MarketDataSpecification specWithRating = MarketDataSpecificationParser.parse("latesthistorical:RATING_NAME");
    assertEquals(new LatestHistoricalMarketDataSpecification("RATING_NAME"), specWithRating);
  }
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.