Package com.opengamma.analytics.financial.provider.description.inflation

Examples of com.opengamma.analytics.financial.provider.description.inflation.InflationProviderDiscount


    _data = data;
  }

  @Override
  public DoubleMatrix2D evaluate(DoubleMatrix1D x) {
    final InflationProviderDiscount bundle = _data.getKnownData().copy();
    InflationProviderDiscount newCurves = _data.getGeneratorMarket().evaluate(x);
    bundle.setAll(newCurves);
    Set<String> curvesSet = _data.getGeneratorMarket().getInflationCurvesList();
    final int nbParameters = _data.getNumberOfInstruments();
    final double[][] res = new double[nbParameters][nbParameters];
    for (int loopinstrument = 0; loopinstrument < _data.getNumberOfInstruments(); loopinstrument++) {
View Full Code Here


      for (int i = 0; i < n; i++) {
        final IndexPrice index = deserializer.fudgeMsgToObject(IndexPrice.class, (FudgeMsg) indexFields.get(i).getValue());
        final PriceIndexCurve curve = deserializer.fudgeMsgToObject(PriceIndexCurve.class, (FudgeMsg) indexCurveFields.get(i).getValue());
        priceIndexCurves.put(index, curve);
      }
      return new InflationProviderDiscount(yieldCurves, priceIndexCurves);
    }
View Full Code Here

    overnight.put(new IndexON("NAME2", Currency.EUR, DayCountFactory.INSTANCE.getDayCount("Act/360"), 0), new YieldCurve("F", ConstantDoublesCurve.from(0.006, "f")));
    final MulticurveProviderDiscount provider = new MulticurveProviderDiscount(discounting, ibor, overnight, matrix);
    final Map<IndexPrice, PriceIndexCurve> curves = new LinkedHashMap<>();
    curves.put(new IndexPrice("CPI1", Currency.USD), new PriceIndexCurve(ConstantDoublesCurve.from(0.02, "A")));
    curves.put(new IndexPrice("CPI2", Currency.EUR), new PriceIndexCurve(ConstantDoublesCurve.from(0.03, "B")));
    final InflationProviderDiscount inflation = new InflationProviderDiscount(provider, curves);
    assertEquals(inflation, cycleObject(InflationProviderDiscount.class, inflation));
  }
View Full Code Here

  /**
   * Analyzes the shape of the forward curve.
   */
  public void marketQuoteSensitivityAnalysis() {

    final InflationProviderDiscount multicurves7 = CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(1).getFirst();
    multicurves7.setAll(CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(0).getFirst());
    final CurveBuildingBlockBundle blocks7 = CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(1).getSecond();
    blocks7.addAll(CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(0).getSecond());
    final double spreadJPYEUR = 0.0010; // 10bps
    final double notional = 100000;
    final GeneratorAttributeIR swapAttribute = new GeneratorAttributeIR(Period.ofYears(4));
View Full Code Here

  /**
   * Analyzes the shape of the forward curve.
   */
  public void marketQuoteSensitivityAnalysis() {

    final InflationProviderDiscount multicurves7 = CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(1).getFirst();
    multicurves7.setAll(CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(0).getFirst());
    final CurveBuildingBlockBundle blocks7 = CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(1).getSecond();
    blocks7.addAll(CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(0).getSecond());
    final double spreadJPYEUR = 0.0010; // 10bps
    final double notional = 100000;
    final GeneratorAttributeIR swapAttribute = new GeneratorAttributeIR(Period.ofYears(4));
View Full Code Here

    @Override
    protected InflationProviderInterface getKnownData(final FunctionInputs inputs) {
      final FXMatrix fxMatrix = (FXMatrix) inputs.getValue(ValueRequirementNames.FX_MATRIX);
      //TODO requires that the discounting curves are supplied externally
      InflationProviderDiscount knownData;
      if (getExogenousRequirements().isEmpty()) {
        knownData = new InflationProviderDiscount(fxMatrix);
      } else {
        knownData = new InflationProviderDiscount((MulticurveProviderDiscount) inputs.getValue(ValueRequirementNames.CURVE_BUNDLE));
        knownData.getMulticurveProvider().setForexMatrix(fxMatrix);
      }
      return knownData;
    }
View Full Code Here

    @Override
    protected Set<ComputedValue> getResults(final ValueSpecification bundleSpec, final ValueSpecification jacobianSpec,
        final ValueProperties bundleProperties, final Pair<InflationProviderInterface, CurveBuildingBlockBundle> pair) {
      final Set<ComputedValue> result = new HashSet<>();
      final InflationProviderDiscount provider = (InflationProviderDiscount) pair.getFirst();
      result.add(new ComputedValue(bundleSpec, provider));
      result.add(new ComputedValue(jacobianSpec, pair.getSecond()));
      for (final String curveName : getCurveNames()) {
        final ValueProperties curveProperties = bundleProperties.copy()
            .with(CURVE, curveName)
            .get();
        final ValueSpecification curveSpec = new ValueSpecification(PRICE_INDEX_CURVE, ComputationTargetSpecification.NULL, curveProperties);
        result.add(new ComputedValue(curveSpec, provider.getCurve(curveName)));
      }
      return result;
    }
View Full Code Here

    @Override
    protected Set<ComputedValue> getResults(final ValueSpecification bundleSpec, final ValueSpecification jacobianSpec,
        final ValueProperties bundleProperties, final Pair<IssuerProviderInterface, CurveBuildingBlockBundle> pair) {
      final Set<ComputedValue> result = new HashSet<>();
      final InflationProviderDiscount provider = (InflationProviderDiscount) pair.getFirst();
      result.add(new ComputedValue(bundleSpec, provider));
      result.add(new ComputedValue(jacobianSpec, pair.getSecond()));
      for (final String curveName : getCurveNames()) {
        final ValueProperties curveProperties = bundleProperties.copy()
            .with(CURVE, curveName)
            .get();
        final ValueSpecification curveSpec = new ValueSpecification(YIELD_CURVE, ComputationTargetSpecification.NULL, curveProperties);
        result.add(new ComputedValue(curveSpec, provider.getCurve(curveName)));
      }
      return result;
    }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.provider.description.inflation.InflationProviderDiscount

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.