Package com.opengamma.analytics.financial.provider.curve

Examples of com.opengamma.analytics.financial.provider.curve.CurveBuildingBlock


      final Pair<YieldCurveBundle, Double[]> unitCal = makeUnit(instrumentsUnit, parametersGuess[loopunit], gen, knownSoFarData, calculator, sensitivityCalculator);
      parametersSoFar.addAll(Arrays.asList(unitCal.getSecond()));
      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, generatorsSoFar, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]),
          knownData, sensitivityCalculator);
      for (int loopcurve = 0; loopcurve < curveGenerators[loopunit].length; loopcurve++) {
        unitBundleSoFar.put(curveNames[loopunit][loopcurve], new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[loopcurve]));
      }
      knownSoFarData.addAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
    return new ObjectsPair<>(knownSoFarData, new CurveBuildingBlockBundle(unitBundleSoFar));
View Full Code Here


      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]), knownData, discountingMap,
          forwardIborMap, forwardONMap, generatorsSoFar, sensitivityCalculator);
      // TODO: should curve matrix be computed only once at the end? To save time
      for (int iCurve = 0; iCurve < nbCurve; iCurve++) {
        final SingleCurveBundle<GeneratorYDCurve> singleCurve = curveBundle.getCurveBundle(iCurve);
        unitBundleSoFar.put(singleCurve.getCurveName(), new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[iCurve]));
      }
      knownSoFarData.setAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
    return new ObjectsPair<>(knownSoFarData, new CurveBuildingBlockBundle(unitBundleSoFar));
View Full Code Here

          sensitivityCalculator);
      parametersSoFar.addAll(Arrays.asList(unitCal.getSecond()));
      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]), knownData,
          discountingMap, forwardIborMap, forwardONMap, generatorsSoFar, sensitivityCalculator);
      for (int loopcurve = 0; loopcurve < curveGenerators[loopunit].length; loopcurve++) {
        unitBundleSoFar.put(curveNames[loopunit][loopcurve], new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[loopcurve]));
      }
      knownSoFarData.setAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
    return new ObjectsPair<>(knownSoFarData, new CurveBuildingBlockBundle(unitBundleSoFar));
View Full Code Here

      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]), knownData, discountingMap,
          forwardIborMap, forwardONMap, generatorsSoFar, sensitivityCalculator);
      // TODO: should curve matrix be computed only once at the end? To save time
      for (int iCurve = 0; iCurve < nbCurve; iCurve++) {
        final SingleCurveBundle<GeneratorYDCurve> singleCurve = curveBundle.getCurveBundle(iCurve);
        unitBundleSoFar.put(singleCurve.getCurveName(), new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[iCurve]));
      }
      knownSoFarData.setAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
    return new ObjectsPair<>(knownSoFarData, new CurveBuildingBlockBundle(unitBundleSoFar));
View Full Code Here

      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]), knownData,
          discountingMap, forwardONMap, inflationMap, generatorsSoFar, sensitivityCalculator);

      for (int iCurve = 0; iCurve < nbCurve; iCurve++) {
        final SingleCurveBundle<GeneratorCurve> singleCurve = curveBundle.getCurveBundle(iCurve);
        unitBundleSoFar.put(singleCurve.getCurveName(), new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[iCurve]));
      }
      knownSoFarData.setAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
View Full Code Here

      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]), knownData, discountingMap,
          forwardIborMap, forwardONMap, issuerMap, generatorsSoFar, sensitivityCalculator);
      // TODO: should curve matrix be computed only once at the end? To save time
      for (int iCurve = 0; iCurve < nbCurve; iCurve++) {
        final SingleCurveBundle<GeneratorYDCurve> singleCurve = curveBundle.getCurveBundle(iCurve);
        unitBundleSoFar.put(singleCurve.getCurveName(), new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[iCurve]));
      }
      knownSoFarData.setAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
    return new ObjectsPair<>(knownSoFarData, new CurveBuildingBlockBundle(unitBundleSoFar));
View Full Code Here

      final DoubleMatrix2D[] mat = makeCurveMatrix(instrumentsSoFarArray, startUnit, nbIns, parametersSoFar.toArray(new Double[parametersSoFar.size()]),
          knownData, inflationMap, generatorsSoFar, sensitivityCalculator);

      for (int iCurve = 0; iCurve < nbCurve; iCurve++) {
        final SingleCurveBundle<GeneratorPriceIndexCurve> singleCurve = curveBundle.getCurveBundle(iCurve);
        unitBundleSoFar.put(singleCurve.getCurveName(), new ObjectsPair<>(new CurveBuildingBlock(unitMap), mat[iCurve]));
      }
      knownSoFarData.setAll(unitCal.getFirst());
      startUnit = startUnit + nbInsUnit;
    }
View Full Code Here

        final Number nParametersNumber = (Number) nParametersFields.get(i).getValue();
        final Integer startPoint = startPointNumber.intValue();
        final Integer nParameters = nParametersNumber.intValue();
        data.put(curveName, Pair.of(startPoint, nParameters));
      }
      return new CurveBuildingBlock(data);
    }
View Full Code Here

      if (size != jacobianFields.size()) {
        throw new OpenGammaRuntimeException("Should have one Jacobian per curve name");
      }
      for (int i = 0; i < size; i++) {
        final String curveName = (String) curveNameFields.get(i).getValue();
        final CurveBuildingBlock curveBuildingBlock = deserializer.fieldValueToObject(CurveBuildingBlock.class, curveBuildingBlockFields.get(i));
        final DoubleMatrix2D jacobian = deserializer.fieldValueToObject(DoubleMatrix2D.class, jacobianFields.get(i));
        data.put(curveName, Pair.of(curveBuildingBlock, jacobian));
      }
      return new CurveBuildingBlockBundle(data);
    }
View Full Code Here

  @Test
  public void testCurveBuildingBlock() {
    final LinkedHashMap<String, Pair<Integer, Integer>> data = new LinkedHashMap<>();
    data.put("YC1", Pair.of(Integer.valueOf(0), Integer.valueOf(20)));
    data.put("YC2", Pair.of(Integer.valueOf(20), Integer.valueOf(30)));
    final CurveBuildingBlock curveBuildingBlock = new CurveBuildingBlock(data);
    assertEquals(curveBuildingBlock, cycleObject(CurveBuildingBlock.class, curveBuildingBlock));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.provider.curve.CurveBuildingBlock

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.