Package com.opengamma.financial.analytics

Examples of com.opengamma.financial.analytics.DoubleLabelledMatrix1D


                .with(CURVE, curveName)
                .get();
            final CurveDefinition curveDefinition = (CurveDefinition) inputs.getValue(new ValueRequirement(CURVE_DEFINITION, ComputationTargetSpecification.NULL,
                ValueProperties.builder().with(CURVE, curveName).get()));
            final ValueSpecification spec = new ValueSpecification(YIELD_CURVE_NODE_SENSITIVITIES, target.toSpecification(), properties);
            final DoubleLabelledMatrix1D ycns = MultiCurveUtils.getLabelledMatrix(entry.getValue(), curveDefinition);
            return Collections.singleton(new ComputedValue(spec, ycns));
          }
        }
        s_logger.info("Could not get sensitivities to " + curveName + " for " + target.getName());
        return Collections.emptySet();
View Full Code Here


                .with(CURVE, curveName)
                .get();
            final CurveDefinition curveDefinition = (CurveDefinition) inputs.getValue(new ValueRequirement(CURVE_DEFINITION, ComputationTargetSpecification.NULL,
                ValueProperties.builder().with(CURVE, curveName).get()));
            final ValueSpecification spec = new ValueSpecification(YIELD_CURVE_NODE_SENSITIVITIES, target.toSpecification(), properties);
            final DoubleLabelledMatrix1D ycns = MultiCurveUtils.getLabelledMatrix(entry.getValue(), curveDefinition);
            return Collections.singleton(new ComputedValue(spec, ycns));
          }
        }
        throw new OpenGammaRuntimeException("Could not get sensitivities to " + curveName + " for " + target.getName());
      }
View Full Code Here

                .with(CURVE, curveName)
                .get();
            final CurveDefinition curveDefinition = (CurveDefinition) inputs.getValue(new ValueRequirement(CURVE_DEFINITION, ComputationTargetSpecification.NULL,
                ValueProperties.builder().with(CURVE, curveName).get()));
            final ValueSpecification spec = new ValueSpecification(YIELD_CURVE_NODE_SENSITIVITIES, target.toSpecification(), properties);
            final DoubleLabelledMatrix1D ycns = MultiCurveUtils.getLabelledMatrix(entry.getValue(), curveDefinition);
            return Collections.singleton(new ComputedValue(spec, ycns));
          }
        }
        s_logger.info("Could not get sensitivities to " + curveName + " for " + target.getName());
        return Collections.emptySet();
View Full Code Here

                .with(CURVE, curveName)
                .get();
            final CurveDefinition curveDefinition = (CurveDefinition) inputs.getValue(new ValueRequirement(CURVE_DEFINITION, ComputationTargetSpecification.NULL,
                ValueProperties.builder().with(CURVE, curveName).get()));
            final ValueSpecification spec = new ValueSpecification(YIELD_CURVE_NODE_SENSITIVITIES, target.toSpecification(), properties);
            final DoubleLabelledMatrix1D ycns = MultiCurveUtils.getLabelledMatrix(entry.getValue(), curveDefinition);
            return Collections.singleton(new ComputedValue(spec, ycns));
          }
        }
        throw new OpenGammaRuntimeException("Could not get sensitivities to " + curveName + " for " + target.getName());
      }
View Full Code Here

    for (int i = 0; i < n; i++) {
      keys[i] = Double.valueOf(i);
      values[i] = result.getEntry(i);
      labels[i] = tenors[i].getPeriod().toString();
    }
    final DoubleLabelledMatrix1D labelledMatrix = new DoubleLabelledMatrix1D(keys, labels, values);
    return Collections.singleton(new ComputedValue(spec, labelledMatrix));
  }
View Full Code Here

      keys[i] = Double.valueOf(i);
      values[i] = resultFx.getEntry(i);
      final FixedIncomeStripWithSecurity strip = iterator.next();
      labels[i] = strip.getResolvedTenor().getPeriod().toString();
    }
    final DoubleLabelledMatrix1D labelledMatrix = new DoubleLabelledMatrix1D(keys, labels, values);
    return Sets.newHashSet(new ComputedValue(spec, labelledMatrix));
  }
View Full Code Here

    final String[] labels = new String[n];
    for (int i = 0; i < n; i++) {
      times[i] = Double.valueOf(i);
      labels[i] = tenors[i].getPeriod().toString();
    }
    final DoubleLabelledMatrix1D matrix = new DoubleLabelledMatrix1D(times, labels, sensitivities);
    final String currency = ((FinancialSecurity) target.getSecurity()).accept(ForexVisitors.getReceiveCurrencyVisitor()).getCode();
    final ValueProperties properties = getResultProperties(Iterables.getOnlyElement(desiredValues), currency).get();
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.FX_FORWARD_POINTS_NODE_SENSITIVITIES, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, matrix));
  }
View Full Code Here

    }
    return newValues;
  }

  protected DoubleLabelledMatrix1D convertDoubleLabelledMatrix1D(final DoubleLabelledMatrix1D value, final double conversionRate) {
    return new DoubleLabelledMatrix1D(value.getKeys(), value.getLabels(), convertDoubleArray(value.getValues(), conversionRate));
  }
View Full Code Here

                .with(CURVE, curveName)
                .get();
            final CurveDefinition curveDefinition = (CurveDefinition) inputs.getValue(new ValueRequirement(CURVE_DEFINITION, ComputationTargetSpecification.NULL,
                ValueProperties.builder().with(CURVE, curveName).get()));
            final ValueSpecification spec = new ValueSpecification(YIELD_CURVE_NODE_SENSITIVITIES, target.toSpecification(), properties);
            final DoubleLabelledMatrix1D ycns = MultiCurveUtils.getLabelledMatrix(entry.getValue(), curveDefinition);
            return Collections.singleton(new ComputedValue(spec, ycns));
          }
        }
        s_logger.info("Could not get sensitivities to " + curveName + " for " + target.getName());
        return Collections.emptySet();
View Full Code Here

                .with(CURVE, curveName)
                .get();
            final CurveDefinition curveDefinition = (CurveDefinition) inputs.getValue(new ValueRequirement(CURVE_DEFINITION, ComputationTargetSpecification.NULL,
                ValueProperties.builder().with(CURVE, curveName).get()));
            final ValueSpecification spec = new ValueSpecification(YIELD_CURVE_NODE_SENSITIVITIES, target.toSpecification(), properties);
            final DoubleLabelledMatrix1D ycns = MultiCurveUtils.getLabelledMatrix(entry.getValue(), curveDefinition);
            return Collections.singleton(new ComputedValue(spec, ycns));
          }
        }
        throw new OpenGammaRuntimeException("Could not get sensitivities to " + curveName + " for " + target.getName());
      }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.analytics.DoubleLabelledMatrix1D

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.