Package com.opengamma.engine

Examples of com.opengamma.engine.ComputationTargetSpecification


  }

  @Override
  public void init(final FunctionCompilationContext context) {
    _definition = _helper.init(context, this);
    final ComputationTargetSpecification targetSpec = ComputationTargetSpecification.of(_definition.getCurrency());
    final ValueProperties properties = createValueProperties().with(ValuePropertyNames.CURVE, _curveName).get();
    _interpolator = new CombinedInterpolatorExtrapolator(Interpolator1DFactory.getInterpolator(_definition.getInterpolatorName()), new FlatExtrapolator1D());
    final String curveReqName = _isYieldCurve ? ValueRequirementNames.YIELD_CURVE : ValueRequirementNames.DISCOUNT_CURVE;
    _result = new ValueSpecification(curveReqName, targetSpec, properties);
    _specResult = new ValueSpecification(ValueRequirementNames.YIELD_CURVE_SPEC, targetSpec, properties);
View Full Code Here


        new ValueSpecification(ValueRequirementNames.CORRELATION_MATRIX, ComputationTargetSpecification.NULL, ValueProperties.all()));
  }

  @Override
  public Set<ValueRequirement> getRequirements(final FunctionCompilationContext context, final ComputationTarget target, final ValueRequirement desiredValue) {
    return Collections.singleton(new ValueRequirement(desiredValue.getValueName(), new ComputationTargetSpecification(ComputationTargetType.PORTFOLIO, context.getPortfolio()
        .getUniqueId()), desiredValue.getConstraints().withoutAny(ValuePropertyNames.FUNCTION)));
  }
View Full Code Here

  }

  @Override
  public void init(final FunctionCompilationContext context) {
    _helper.init(context, this);
    final ComputationTargetSpecification currencySpec = ComputationTargetSpecification.of(_helper.getCurrency());
    _marketDataResult = new ValueSpecification(ValueRequirementNames.YIELD_CURVE_MARKET_DATA, currencySpec,
        createValueProperties().with(ValuePropertyNames.CURVE, _helper.getCurveName()).get());
    _results = Sets.newHashSet(_marketDataResult);
  }
View Full Code Here

    final ViewCalculationConfiguration calcConfig = createViewCalculationConfiguration(tempTarget.getViewDefinition(), context.getViewCalculationConfiguration().getName());
    addValueRequirements(context, target, calcConfig);
    tempTarget.getViewDefinition().addViewCalculationConfiguration(calcConfig);
    final TempTargetRepository targets = OpenGammaCompilationContext.getTempTargets(context);
    final UniqueId tempTargetId = targets.locateOrStore(tempTarget);
    final ComputationTargetSpecification targetSpec = new ComputationTargetSpecification(TempTarget.TYPE, tempTargetId);
    return createRequirements(targetSpec);
  }
View Full Code Here

  }

  @Override
  public void init(final FunctionCompilationContext context) {
    final ComputationTargetSpecification currencySpec = ComputationTargetSpecification.of(_currency);

    _interpolatedCurveResult = new ValueSpecification(ValueRequirementNames.YIELD_CURVE_INTERPOLATED, currencySpec,
        createValueProperties().with(ValuePropertyNames.CURVE, _curveName).get());
    _results = Sets.newHashSet(_interpolatedCurveResult);
  }
View Full Code Here

    _helper = new VolatilityCubeFunctionHelper(currency, definitionName);
  }

  @Override
  public void init(final FunctionCompilationContext context) {
    final ComputationTargetSpecification currencyTargetSpec = ComputationTargetSpecification.of(_helper.getCurrency());
    _cubeResult = new ValueSpecification(ValueRequirementNames.STANDARD_VOLATILITY_CUBE_DATA, currencyTargetSpec,
        createValueProperties().with(ValuePropertyNames.CUBE, _helper.getDefinitionName()).get());
    _results = Sets.newHashSet(_cubeResult);
  }
View Full Code Here

    }
    final ValueProperties surfaceProperties = ValueProperties.builder()
        .with(ValuePropertyNames.SURFACE, _definitionName)
        .with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, _instrumentType)
        .withAny(EquityVarianceSwapStaticReplicationFunction.STRIKE_PARAMETERIZATION_METHOD/*, VarianceSwapStaticReplication.StrikeParameterization.STRIKE.toString()*/).get();
    final ComputationTargetSpecification targetSpec = ComputationTargetSpecification.of(_definition.getTarget().getUniqueId());
    _requirement = new ValueRequirement(ValueRequirementNames.STANDARD_VOLATILITY_SURFACE_DATA, targetSpec, surfaceProperties);
    _result = new ValueSpecification(ValueRequirementNames.INTERPOLATED_VOLATILITY_SURFACE, targetSpec,
        createValueProperties()
        .with(ValuePropertyNames.SURFACE, _definitionName)
        .with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, _instrumentType)
View Full Code Here

      if (constraints == null) {
        constraints = desiredValue.getConstraints().copy();
      }
      constraints.with(HistoricalTimeSeriesFunctionUtils.INCLUDE_END_PROPERTY, HistoricalTimeSeriesFunctionUtils.YES_VALUE);
    }
    final ComputationTargetSpecification targetSpec = target.toSpecification();
    if (constraints == null) {
      // We can satisfy the desired value as-is, just ask for the curve specification to drive our behavior
      final ValueProperties curveConstraints;
      values = desiredValue.getConstraints().getValues(ValuePropertyNames.CURVE);
      if (values != null) {
View Full Code Here

  public void init(final FunctionCompilationContext context) {
    _definition = _helper.init(context, this);
    if (_definition == null) {
      throw new UnsupportedOperationException("Definition " + _helper.getDefinitionName() + " on " + _helper.getCurrency() + " failed");
    }
    final ComputationTargetSpecification currencySpec = ComputationTargetSpecification.of(_helper.getCurrency());
    _marketDataResult = new ValueSpecification(ValueRequirementNames.VOLATILITY_CUBE_MARKET_DATA, currencySpec,
        createValueProperties().with(ValuePropertyNames.CUBE, _helper.getDefinitionName()).get());
    _results = Sets.newHashSet(_marketDataResult);
  }
View Full Code Here

    final Set<ComputedValue> results = new HashSet<ComputedValue>();
    ValueGreek valueGreek;
    Double valueGreekResult;
    ValueSpecification resultSpecification;
    ComputedValue resultValue;
    final ComputationTargetSpecification targetSpec = target.toSpecification();
    for (final ValueRequirement dV : desiredValues) {
      valueGreek = AvailableValueGreeks.getValueGreekForValueRequirementName(dV.getValueName());
      valueGreekResult = sensitivities.get(valueGreek);
      resultSpecification = new ValueSpecification(dV.getValueName(), targetSpec, dV.getConstraints());
      resultValue = new ComputedValue(resultSpecification, valueGreekResult);
View Full Code Here

TOP

Related Classes of com.opengamma.engine.ComputationTargetSpecification

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.