Package com.opengamma.core.marketdatasnapshot.impl

Examples of com.opengamma.core.marketdatasnapshot.impl.ManageableYieldCurveSnapshot


    globalValues.putValue(specA, "X", new ValueSnapshot(Double.valueOf(12), null));
    globalValues.putValue(specA, "Y", new ValueSnapshot(Double.valueOf(1), null));
    globalValues.putValue(specA, "Z", new ValueSnapshot(null, null));
    globalValues.putValue(specB, "X", new ValueSnapshot(Double.valueOf(12), Double.valueOf(11)));

    final ManageableYieldCurveSnapshot manageableYieldCurveSnapshot = new ManageableYieldCurveSnapshot();
    manageableYieldCurveSnapshot.setValuationTime(Instant.now());
    manageableYieldCurveSnapshot.setValues(globalValues);
    yieldCurves.put(new YieldCurveKey(Currency.GBP, "Default"), manageableYieldCurveSnapshot);

    snapshot1.setYieldCurves(yieldCurves);

    final HashMap<Pair<Tenor, Tenor>, ValueSnapshot> strikes = new HashMap<Pair<Tenor, Tenor>, ValueSnapshot>();
View Full Code Here


  @Override
  ManageableYieldCurveSnapshot buildSnapshot(ViewComputationResultModel resultModel, YieldCurveKey key,
      SnapshotDataBundle bundle) {
    ManageableUnstructuredMarketDataSnapshot values = getUnstructured(bundle);
    ManageableYieldCurveSnapshot ret = new ManageableYieldCurveSnapshot();
    ret.setValues(values);
    ret.setValuationTime(resultModel.getViewCycleExecutionOptions().getValuationTime());
    return ret;
  }
View Full Code Here

  private void buildYieldCurves(HashMap<String, Pair<YieldCurveKey, ManageableYieldCurveSnapshot>> yieldCurveBuilder,
                                Map<String, String> currentRow) {
    String name = currentRow.get(SnapshotColumns.NAME.get());

    if (!yieldCurveBuilder.containsKey(name)) {
      ManageableYieldCurveSnapshot curve = new ManageableYieldCurveSnapshot();
      ManageableUnstructuredMarketDataSnapshot snapshot = new ManageableUnstructuredMarketDataSnapshot();
      YieldCurveKey key = new YieldCurveKey(Currency.of(currentRow.get(SnapshotColumns.YIELD_CURVE_CURRENCY.get())),
                                            currentRow.get(SnapshotColumns.NAME.get()));

      curve.setValuationTime(Instant.parse(currentRow.get(SnapshotColumns.INSTANT.get())));
      snapshot.putValue(createExternalIdBundle(currentRow),
                        currentRow.get(SnapshotColumns.VALUE_NAME.get()),
                        createValueSnapshot(currentRow));
      curve.setValues(snapshot);
      yieldCurveBuilder.put(name, Pair.of(key, curve));
    } else {
      yieldCurveBuilder.get(name).getSecond().getValues().putValue(createExternalIdBundle(currentRow),
                                                   currentRow.get(SnapshotColumns.VALUE_NAME.get()),
                                                   createValueSnapshot(currentRow));
View Full Code Here

TOP

Related Classes of com.opengamma.core.marketdatasnapshot.impl.ManageableYieldCurveSnapshot

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.