Package com.opengamma.engine.value

Examples of com.opengamma.engine.value.ValueSpecification


    final ValueProperties externalProperties = createCurrencyValueProperties(target)
                      .withAny(ValuePropertyNames.CURRENCY)
                      .withAny(ValuePropertyNames.CURVE)
                      .withAny(ValuePropertyNames.CURVE_CURRENCY)
                      .withAny(ValuePropertyNames.CURVE_CALCULATION_CONFIG).get();
    final Set<ValueSpecification> results = Collections.singleton(new ValueSpecification(PV01_REQUIREMENT, target.toSpecification(), externalProperties));
    return results;
  }
View Full Code Here


    assert curveName != null;
    final ValueProperties valueProperties = createCurrencyValueProperties(target).with(ValuePropertyNames.CURVE, curveName)
                                                                                 .with(ValuePropertyNames.CURVE_CURRENCY, curveCurrencyName)
                                                                                 .with(ValuePropertyNames.CURVE_CALCULATION_CONFIG, curveCalculationConfigName)
                                                                                 .get();
    final Set<ValueSpecification> results = Collections.singleton(new ValueSpecification(PV01_REQUIREMENT, targetSpec, valueProperties));
    return results;
  }
View Full Code Here

    final ValueProperties properties = createCurrencyValueProperties(target)
        .with(ValuePropertyNames.CURVE, curveName)
        .with(ValuePropertyNames.CURVE_CURRENCY, curveCurrency)
        .with(ValuePropertyNames.CURVE_CALCULATION_CONFIG, curveCalculationConfig)
        .get();
    final ComputedValue computedValue = new ComputedValue(new ValueSpecification(PV01_REQUIREMENT, specification, properties), result);
    return Collections.singleton(computedValue);
  }
View Full Code Here

    boolean requirements = false;
    for (final FudgeField field : msg) {
      final Integer ord = field.getOrdinal();
      if (ord != null) {
        if (ord.intValue() == 1) {
          final ValueSpecification specification = deserializer.fieldValueToObject(ValueSpecification.class, field);
          if (requirements) {
            queue.add(specification);
          } else if (queue.isEmpty()) {
            queue.add(specification);
            requirements = true;
View Full Code Here

      final String targetTypeIdValue = rs.getString("target_type_id_value");
      final String targetTypeIdVersion = rs.getString("target_type_id_version");
      final UniqueId targetId = UniqueId.of(targetTypeIdScheme, targetTypeIdValue, targetTypeIdVersion);
      final ValueProperties valueProperties = RiskValueProperties.parseJson(valueRequirementsSyntheticForm);
      final String configurationName = rs.getString("config_name");
      final ValueSpecification valueSpecification = ValueSpecification.of(valueName, computationTargetType, targetId, valueProperties);
      final ComputedValueResult computedValue = new ComputedValueResult(valueSpecification, value, AggregatedExecutionLog.EMPTY);
      final ViewResultEntry viewResultEntry = new ViewResultEntry(configurationName, computedValue);

      return viewResultEntry;
    }
View Full Code Here

      properties.withoutAny(SOURCE_CURRENCY_PROPERTY).with(SOURCE_CURRENCY_PROPERTY, sourceCurrency.getCode());
      for (Currency targetCurrency : targetCurrencies) {
        if (!targetCurrency.equals(sourceCurrency)) {
          final CurrencyMatrixValue conversion = matrix.getConversion(sourceCurrency, targetCurrency);
          if (conversion != null) {
            results.add(new ValueSpecification(valueRequirementName, targetSpec, properties.withoutAny(TARGET_CURRENCY_PROPERTY).with(TARGET_CURRENCY_PROPERTY, targetCurrency.getCode()).get()));
          }
        }
      }
    }
    return results;
View Full Code Here

    final ValueProperties.Builder properties = createValueProperties();
    for (Currency sourceCurrency : resultBuilder._sourceCurrencies) {
      properties.withoutAny(SOURCE_CURRENCY_PROPERTY).with(SOURCE_CURRENCY_PROPERTY, sourceCurrency.getCode());
      for (Currency targetCurrency : resultBuilder._targetCurrencies) {
        if (resultBuilder.hasInputFor(sourceCurrency, targetCurrency)) {
          results.add(new ValueSpecification(valueRequirementName, targetSpec, properties.withoutAny(TARGET_CURRENCY_PROPERTY).with(TARGET_CURRENCY_PROPERTY, targetCurrency.getCode()).get()));
        }
      }
    }
    return results;
  }
View Full Code Here

    final CurrencyMatrix matrix = (CurrencyMatrix) target.getValue();
    final Set<ComputedValue> result = Sets.newHashSetWithExpectedSize(desiredValues.size());
    for (ValueRequirement desiredValue : desiredValues) {
      final Currency sourceCurrency = Currency.of(desiredValue.getConstraint(SOURCE_CURRENCY_PROPERTY));
      final Currency targetCurrency = Currency.of(desiredValue.getConstraint(TARGET_CURRENCY_PROPERTY));
      final ValueSpecification valueSpec = new ValueSpecification(desiredValue.getValueName(), target.toSpecification(), desiredValue.getConstraints());
      final Object resultValue = getRate(matrix, desiredValue, executionContext, inputs, sourceCurrency, targetCurrency);
      if (resultValue != null) {
        result.add(new ComputedValue(valueSpec, resultValue));
      }
    }
View Full Code Here

  public ComputationTargetType getTargetType() {
    return CurrencyPair.TYPE;
  }

  private ValueSpecification createSpotRateResult(ComputationTargetSpecification targetSpec, ValueProperties properties) {
    return new ValueSpecification(ValueRequirementNames.SPOT_RATE, targetSpec, properties);
  }
View Full Code Here

    properties = properties.copy()
        .withAny(HistoricalTimeSeriesFunctionUtils.START_DATE_PROPERTY)
        .with(HistoricalTimeSeriesFunctionUtils.INCLUDE_START_PROPERTY, HistoricalTimeSeriesFunctionUtils.NO_VALUE, HistoricalTimeSeriesFunctionUtils.YES_VALUE)
        .withAny(HistoricalTimeSeriesFunctionUtils.END_DATE_PROPERTY)
        .with(HistoricalTimeSeriesFunctionUtils.INCLUDE_END_PROPERTY, HistoricalTimeSeriesFunctionUtils.NO_VALUE, HistoricalTimeSeriesFunctionUtils.YES_VALUE).get();
    return new ValueSpecification(ValueRequirementNames.HISTORICAL_FX_TIME_SERIES, targetSpec, properties);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.value.ValueSpecification

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.