Package com.opengamma.financial.analytics.ircurve.strips

Examples of com.opengamma.financial.analytics.ircurve.strips.PointsCurveNodeWithIdentifier


            bundle.add(dataField, ids, bundleForCurve.get(dataField, ids));
          } else {
            s_logger.info("Could not get historical time series for {}", ids);
          }
          if (node instanceof PointsCurveNodeWithIdentifier) {
            final PointsCurveNodeWithIdentifier pointsNode = (PointsCurveNodeWithIdentifier) node;
            dataField = pointsNode.getUnderlyingDataField();
            ids = ExternalIdBundle.of(pointsNode.getUnderlyingIdentifier());
            ts = bundleForCurve.get(dataField, ids);
            if (ts != null) {
              bundle.add(dataField, ids, bundleForCurve.get(dataField, ids));
            } else {
              s_logger.info("Could not get historical time series for {}", ids);
View Full Code Here


        }
      } else {
        s_logger.info("Couldn't get time series for {}", id);
      }
      if (node instanceof PointsCurveNodeWithIdentifier) {
        final PointsCurveNodeWithIdentifier pointsNode = (PointsCurveNodeWithIdentifier) node;
        id = ExternalIdBundle.of(pointsNode.getUnderlyingIdentifier());
        dataField = pointsNode.getUnderlyingDataField();
        timeSeries = timeSeriesSource.getHistoricalTimeSeries(dataField, id, resolutionKey, startDate, includeStart, endDate, includeEnd);
        if (timeSeries != null) {
          if (timeSeries.getTimeSeries().isEmpty()) {
            s_logger.info("Time series for {} is empty", id);
          } else {
View Full Code Here

      if (ts == null) {
        throw new OpenGammaRuntimeException("Could not get time series for id " + curveNode.getIdentifier() + " and data field " + curveNode.getDataField());
      }
      LocalDateDoubleTimeSeries pnlSeries;
      if (curveNode instanceof PointsCurveNodeWithIdentifier) {
        final PointsCurveNodeWithIdentifier pointsCurveNode = (PointsCurveNodeWithIdentifier) curveNode;
        final HistoricalTimeSeries underlyingSeries = tsBundle.get(pointsCurveNode.getUnderlyingDataField(), pointsCurveNode.getUnderlyingIdentifier());
        if (underlyingSeries == null) {
          throw new OpenGammaRuntimeException("Could not get time series for id " + pointsCurveNode.getUnderlyingIdentifier() + " and data field " + pointsCurveNode.getUnderlyingDataField());
        }
        pnlSeries = getReturnSeries(ts.getTimeSeries().add(underlyingSeries.getTimeSeries()), desiredValue, executionContext);
      } else {
        pnlSeries = getReturnSeries(ts.getTimeSeries(), desiredValue, executionContext);
      }
View Full Code Here

        if (id.getDataField() != null) {
          final ComputedValue value = inputs.getComputedValue(new ValueRequirement(id.getDataField(), ComputationTargetType.PRIMITIVE, id.getIdentifier()));
          if (value != null) {
            final ExternalIdBundle identifiers = value.getSpecification().getTargetSpecification().accept(resolver);
            if (id instanceof PointsCurveNodeWithIdentifier) {
              final PointsCurveNodeWithIdentifier pointsId = (PointsCurveNodeWithIdentifier) id;
              final ComputedValue base = inputs.getComputedValue(new ValueRequirement(pointsId.getUnderlyingDataField(), ComputationTargetType.PRIMITIVE, pointsId.getUnderlyingIdentifier()));
              if (base != null) {
                final ExternalIdBundle spreadIdentifiers = value.getSpecification().getTargetSpecification().accept(resolver);
                if (value.getValue() == null || base.getValue() == null) {
                  marketData.setDataPoint(spreadIdentifiers, null);
                } else {
                  marketData.setDataPoint(spreadIdentifiers, (Double) value.getValue() + (Double) base.getValue());
                }
              } else {
                s_logger.info("Could not get market data for {}", pointsId.getUnderlyingIdentifier());
              }
            } else {
              marketData.setDataPoint(identifiers, (Double) value.getValue());
            }
          } else {
View Full Code Here

      for (final CurveNodeWithIdentifier id : _specification.getNodes()) {
        try {
          if (id.getDataField() != null) {
            requirements.add(new ValueRequirement(id.getDataField(), ComputationTargetType.PRIMITIVE, id.getIdentifier()));
            if (id instanceof PointsCurveNodeWithIdentifier) {
              final PointsCurveNodeWithIdentifier node = (PointsCurveNodeWithIdentifier) id;
              requirements.add(new ValueRequirement(node.getUnderlyingDataField(), ComputationTargetType.PRIMITIVE, node.getUnderlyingIdentifier()));
            }
          } else {
            requirements.add(new ValueRequirement(MarketDataRequirementNames.MARKET_VALUE, ComputationTargetType.PRIMITIVE, id.getIdentifier()));
          }
        } catch (final OpenGammaRuntimeException e) {
View Full Code Here

      final ExternalId identifier = provider.getInstrument(_curveDate, tenor);
      final String dataField = provider.getMarketDataField();
      final DataFieldType fieldType = provider.getDataFieldType();
      final ExternalId underlyingId = provider.getUnderlyingInstrument();
      final String underlyingField = provider.getUnderlyingMarketDataField();
      return new PointsCurveNodeWithIdentifier(node, identifier, dataField, fieldType, underlyingId, underlyingField);
    }
    final ExternalId identifier = _nodeIdMapper.getFXForwardNodeId(_curveDate, tenor);
    final String dataField = _nodeIdMapper.getFXForwardNodeDataField(tenor);
    final DataFieldType fieldType = _nodeIdMapper.getFXForwardNodeDataFieldType(tenor);
    return new CurveNodeWithIdentifier(node, identifier, dataField, fieldType);
View Full Code Here

TOP

Related Classes of com.opengamma.financial.analytics.ircurve.strips.PointsCurveNodeWithIdentifier

Copyright © 2018 www.massapicom. 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.