Package com.opengamma.financial.analytics

Examples of com.opengamma.financial.analytics.LocalDateLabelledMatrix1D


                                                ISDACompliantCreditCurve hazardCurve,
                                                CDSAnalytic analytic) {

    //TODO: bump type
    Double bump = Double.valueOf(Iterables.getOnlyElement(properties.getValues(CreditInstrumentPropertyNamesAndValues.PROPERTY_SPREAD_CURVE_BUMP)));
    final LocalDateLabelledMatrix1D cs01Matrix = StandardVanillaBucketedCS01CDSFunction.getBucketedCS01(definition, yieldCurve, times, hazardCurve, analytic, bump * 1e-4);
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.BUCKETED_CS01, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, cs01Matrix));
  }
View Full Code Here


    final int n = calibrationTenors.length;
    final LocalDate[] dates = new LocalDate[n];
    for (int i = 0; i < n; i++) {
      dates[i] = calibrationTenors[i].toLocalDate();
    }
    final LocalDateLabelledMatrix1D cs01Matrix = new LocalDateLabelledMatrix1D(dates, gammaCS01);
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.BUCKETED_GAMMA_CS01, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, cs01Matrix));
  }
View Full Code Here

        CreditInstrumentPropertyNamesAndValues.PROPERTY_SPREAD_CURVE_BUMP)));
    final SpreadBumpType spreadBumpType = SpreadBumpType.valueOf(Iterables.getOnlyElement(properties.getValues(CreditInstrumentPropertyNamesAndValues.PROPERTY_SPREAD_BUMP_TYPE)));
    final double[] gammaCS01 = new double[times.length];
    final LocalDate[] dates = new LocalDate[times.length];
    StandardVanillaBucketedGammaCS01CDSFunction.bucketedGammaCS01(definition, yieldCurve, times, marketSpreads, hazardCurve, analytic, spreadCurveBump, spreadBumpType, gammaCS01, dates);
    final LocalDateLabelledMatrix1D cs01Matrix = new LocalDateLabelledMatrix1D(dates, gammaCS01);
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.BUCKETED_GAMMA_CS01, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, cs01Matrix));
  }
View Full Code Here

      final CouponFixedDefinition coupon = coupons.getNthPayment(i);
      dates[i] = coupon.getPaymentDate().toLocalDate();
      payments[i] = coupon.getAmount() * coupon.getNotional();
    }
    payments[n - 1] += coupons.getNthPayment(n - 1).getNotional();
    final LocalDateLabelledMatrix1D matrix = new LocalDateLabelledMatrix1D(dates, payments);
    return Collections.singleton(new ComputedValue(new ValueSpecification(ValueRequirementNames.BOND_COUPON_PAYMENT_TIMES, target.toSpecification(), createValueProperties().get()), matrix));
  }
View Full Code Here

TOP

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

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.